Forum Moderators: not2easy
* Line: 62 Context : #containerParse Error - ` background: url(Images/side_background.gif) left repeat-y;
* Line: 64
Lexical error at line 65, column 3. Encountered: <EOF> after : ""
I get that when running this portion of an otherwise-validated stylesheet through the W3C Validator:
#container {
margin: 0;
width:700px;
height:100%;
position: relative;
`background: url(Images/side_background.gif) left repeat-y;
text-align: left;
} I also tried submitting it as:
#container {
margin: 0;
width:700px;
height:100%;
position: relative;
`background: url(Images/side_background.gif) left repeat-y;
text-align: left;
} and got:
* Line: 6 Context : #containerParse Error - ` background-image:url(Images/side_background.gif);
* Line: 7 Context : background-repeat
Parse Error - repeat-y;
* Line: 8 Context : background-position
Parse Error - left;
* Line: 10
Parse Error - : left; }
This is my first attempt to use CSS to this extent in a website, and I'm sure I'm missing something silly. Seeing the responses to other posts, I'm thinking this is the place to go for advice. Any ideas?
But, I do have another question. The point of the above code is to get 'side-background.gif' to repeat indefinetly down the page within the #container. As it stands now, it's showing up once, and not repeating. Any ideas on that one?
Anyway, I've gotten everything set so that the W3C validators think I'm great. However, so long as I have the <!DOCTYPE> header in the file, neither Firefox or IE will load the background image. I'm using the doctype off the W3C website, that is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Also, how can I make the background image span the length of the page and not move (i.e., when I scroll, it stays where it is)?
when I scroll, it stays where it is
background-attachment: fixed;
so long as I have the <!DOCTYPE> header in the file, neither Firefox or IE will load the background image
Sounds odd -- have you validated the html?
One thing you are doing that is not a best practice is capitalizing the "Images" directory - by any chance is that word actually lower case, or crossed up in some other way?
For the image directory: no, it really is capitalized. It hasn't caused me any problems thus far. And yes, the HTML is validated with zero errors (when the DOCTYPE is there of course).
When I delete the doctype tag, everything works perfectly in IE. Firefox still renders oddly, I'm not sure why.