The problem: My html pages can't seem to locate my external CSS if they are more than a few folders deep in root. I'm fairly new to CSS, but I'm now using it at my website: http://www.buckeyeboys.net I was happy with what I had accomplished, as I've never taken a class in web-design or anything like that. A few days ago I was working on a video index for my site when I noticed that the external CSS I'm using (which, incidentally, is located at root), works well when called by most of my pages, but basically doesn't seem to be called or located by html pages deeper than a single folder past root.
I've looked around online for an answer, and I think it's something simple that an ignoramus of my level wouldn't notice. FYI, my browser of choice is FF 2.0.0.4, though I've examined the site with IE 7 as well. And sorry for the long post, just wanted to put in plenty of info.
The css:
body { background-image: url('images/bground.gif');
background-repeat: no-repeat; background-color: black}
td {text-align: center; vertical-align: top;}
h4 {color: red; font-size: 16; font-family: tahoma, verdana, sans-serif; }
li {color: orange;}
.intab {background-color: rgb(31, 31, 31); text-align: center;}
.ud {color: orange;}
p { text-indent: 2em; margin-top: 0; margin-bottom: 0; color:White; font-family:tahoma, verdana, sans-serif;
font-size: 13px; font-weight:400; text-align:left; }
.deepsea {background-image:url('images/back.gif');
and and example page in question, two levels deeper than root:
@import "../fix.css";
Videos
Crestline Finale '07
Here it is! Fresh off the memory card, taken only
hours ago! The finale of the 2007 Crestline fireworks show!
(PS: Youtube's server may lag a bit, so if the video doesn't work for you, check back tommorow.)
Copyright © BuckeyeBoys (Buckeye
Boys) .net 2007
And these are both live on the web as well. Any help would be greatly appreciated! I only designed my first site back in February, so I'm still new to some of this!
Oh, and the html for the malfunctioning page is: http://buckeyeboys.net/videos/fireworks/fireworksfinale.html Thanks!
You could use the absolute
You could use the absolute path to your external stylesheet. This will allow you to move pages around and they will still be able to find your SS.
Eg,
Put it inbetween the head tags.
cheers
thanks very much, I was
thanks very much, I was hoping it would be something with a simple fix, as things rarely seem to be these days. appreciate it!
No probs. Hope it helps.
No probs. Hope it helps.
BTW, it's probably better if you use a strict doctype if you are creating new pages. Transititional is really only if you are updating from a table based layout. Strict doctypes are a lot better if you are learning. That way you don't learn and reinforce bad habits.
yea, when i first designed
yea, when i first designed the site (its still in the process of major overhaul) I used a wysiwyg editor (NVU) which did the hard work for me (including decisions such as the doctype.)Now I go back and forth between Nvu and just a text editor, the goal being to just eventually be able to do it all by hand. thanks for the tips, I'll look into using a strict doctype from now on.