External CSS file

I’m a neopyhte to building a web site. I’m using the book by Ian LLoyd on building a web site. I can’t get past page 80 because the Style1.css is not recognized by my web pages. The web pages and CSS file are in the same folder. i know all my coding is correct. Can you tell me why my web pages do not recognize Style1.css?

[FONT=Verdana]Hi pushornl and welcome to the forums. :slight_smile:

The usual cause of this problem (we’ve all done it ;)) is a typo. If your file is called Style1.css, are you sure you haven’t linked to style1.css from your HTML? If you can’t spot an obvious error like that, then please post a link to your site, or post your full HTML and CSS code here, so we can take a look at it for you.
[/FONT]

Welcome to Sitepoint, and nice to see you have chosen to take the red pill, NEOphyte

Yes, links and css rules are case sensitive, so be careful.

Also remember that the path to your CSS file is relative to the document. So if for some reason you have put this particular file in a sub folder… you must account for that with “./” in your path structure.

Yup, we’ve all done it. Except for me. :shifty:

Usually, I put my CSS files in their own dedicated folder, cleverly entited “css”. So for a particular project, I might use the following code in my heading:

<link rel="stylesheet" href="css/mystyles.css" type="text/css" media="screen">

The [COLOR="#B22222"][B]href="css/mystyles.css"[/B][/COLOR] bit tells the HTML file where to find the CSS file.

Thanks Techno bear. Your comment about the being sure that you have the complete web address, woke me up. I didn’t have the HTML appended to the Style1.CSS file.
Thanks again!

Glad we could help. :slight_smile: