coded into a corner

I am stuck.

I’m working with a third party template in Dreamweaver. It previews just fine in Firefox. Looks great. And this is the second template I have used from the same designer (the first one worked without incident). This one, once uploaded, shows the text only. No graphics. It’s an html template with an accompanying default.css stylesheet. The links are all relative, so the path images/whatever.jpg persists. I compared the calls and the stylesheet itself to the other (succesful) template and as far as I can tell, everything matches for syntax.

It appears that the html file can’t see the css file. But as far as I can tell, it’s a straightforward call and the syntax is fine.

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=utf-8″ />
<title>website name (WP for some reason won’t display this close title, but it’s there)
<meta name=”keywords” content=”” />
<meta name=”description” content=”” />
<link href=”default.css” rel=”stylesheet” type=”text/css” />
<style type=”text/css”>
(commented)
@import url(“layout.css”);
(uncommented)
</style>
</head>

Beats me. As I said, both headers look the same except for the title. Clearly the problem isn’t there.

So I tried replacing the default.css file with the one that works from the other template, and obviously it was a mess, but at least some graphics with the same name did show up. So it’s the default.css file, yes? Right? But for the life of me the code looks right. The paths, as I said, are relative. I know the problem has to be in there, but I don’t see it.

I am at the point where I either go on a random killing spree of incoherent rage or I get a new template. What I will actually do is go back into it, and keep cracking away until I get it.

Thanks for letting me think out loud in print. How’s things?

8 thoughts on “coded into a corner”

  1. Things are great! But since it’s after 1 am and I’m typing, you know I’m drunk. So far, no spelling mistakes…yay me! Would you help me please? I need a poster for my kids play. I have all the info and stuff… umm ya, so I should email you. Hope you got that code figured out.

  2. yeah. what you need to do is use a path like

    “/includes/css/layout.css”

    or whatever the path is from your webserver public root.

    it might be “/layout.css” if your css file is just on the public root level (its address to the outside world would be http://www.adriantaverner.com/layout.css in this case).

    either way, what this does is that it allows you to publish the template code to any directory any it will always look for the layout.css file in a consistent place.

    referencing “layout.css” (note: no slash at the beginning) means that the css file is in the same directory as the file that is calling it, which will not always be the case, especially with archive pages etc.

    I can explain more if you ping me on MSN :)

  3. All the links are relative, so they are supposed to work no matter where they go, so long as they are in the same parent folder as the index. I mentioned that I tried another css file and the index did successfully call the images with the same name. Looked wacky, but it worked. Hence my stumpedness. Actually, I would dearly love another set of eyes on this if you have a bit of time. I will email you some ftp credentials.

  4. Still haven’t heard back from Brian, and I need his login info before I can harass the template builders for a fix. I do have the ammunition now, thanks to you, and I will let you know how it all works out.

Comments are closed.