Help - Search - Members - Calendar
Full Version: External CSS document
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
jawbkk
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
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
Many thanks for the quick reply Frederick.... I have modified errors and all is well!!

Frederiek
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.
Invision Power Board © 2001-2009 Invision Power Services, Inc.