jawbkk
Aug 23 2009, 07:04 AM
Hello,
I am a beginner with HTML and I am trying to import a CSS file (or making reference to it from the HTML document)
Is there any reason why I cannot get my HTML document to read the stylesheet when the text in both documents seems 100% correct? (I am working through a book and I have checked everything!!)
frustrating, but I wonder is there anything to do with my browser etc. I have a new laptop with good spec so would be surprised if the CSS file couldn't be recognised.
Regards
John
Frederiek
Aug 23 2009, 07:27 AM
Your LINK tag is closed with " />" which is the XHTML syntax to close empty elements. But since you use HTML, simply use >.
And then your selectors don't match with the ID's of the elements, since the CSS uses lowercase and the ID's are in uppercase.
Forgot to say, you have three times #chapter1contents declared in the CSS.
Beware that ID must be unique and can only occur once in a page.
jawbkk
Aug 23 2009, 07:55 AM
Many thanks for the quick reply Frederick.... I have modified errors and all is well!!
Frederiek
Aug 23 2009, 11:42 AM
You're welcome.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.