pushornl — 2012-06-23T11:28:55-04:00 — #1
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?
technobear — 2012-06-23T13:58:09-04:00 — #2
Hi pushornl and welcome to the forums.
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.
dresden_phoenix — 2012-06-23T17:14:45-04:00 — #3
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.
black_max — 2012-06-23T18:21:08-04:00 — #4
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">
<font color='"#B22222"'>[B]href="css/mystyles.css"[/B]</font> bit tells the HTML file where to find the CSS file.
pushornl — 2012-06-24T11:48:07-04:00 — #5
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.
technobear — 2012-06-24T11:49:35-04:00 — #6