I am right at the beginning of my web design "career"! I am reading "Build you own Website the right way using HTML and CSS", and following the instructions to build a sample site. But something isn't quite right. I have 3 pages written in html, which look as they should with IE. But now I am adding a CSS page. I have this copied exactly from the book, and saved in the same file as the other 3 pages. I have put a link, again copied axactly from the book, into the 3 pages of HTML. I have checked the links and code several times. But the CSS instructions eg for Font and colour, are not being followed. The CSS page doesn't appear to be linked to the HTML pages. I have followed the instructions in the book, to "force Reload" the pages, to avoid caching problems, and it made no difference. Also the photo that I have tried to put into the HTml page isn't showing up, just a frame where it should be, even though it is also saved in the same file. I am doing all this offline. What am I doing wrong?
What i usually Do is use all my CSS Inline with my html untill i am ready to put it up on the Server.
Its just easier that way. I can help you Much More if you Gave us a Link to See this example site.
Or by posting the html & CSS in the thread.
CSS code as follows:
CSS for chocoholics anon
font-family: Verdana, Helvetica, Arial, sans-serif;
HTML code :
(Doctype etc missing as forum wouldn't let W3 links be posted)
<title>ChocaholicsAnon - Are you addicted to Chocolate?</title>
<meta http-equiv="Content-type" content="text/html; charset=utf - 8" />
<link href="style1.css" rel="stylesheet" type="text/css" />
<div id= "header">
<h1>ChocaholicsAnon - Are you addicted to Chocolate?</h1>
<p> Come and join us! A community with all Chocolate resources in one place.</p>
</div> <!-- end of header div-->
(NAVIGATION REMOVE FOR FORUM PURPOSES)
</div> <!-- end of navigation div -->
<h2>Do you have a passion for Chocolate? </h2>
<p><img src="Fotolia_6603249_XSpouringchoc.jpg" width ="283" height="424"
alt="pouring melted chocolate" /></p>
<p>At Chocaholicsanon you will not be alone. Here, you can buy a special gift, share a favourite chocolate recipe, or discover the history of chocolate. Want to know more about FairTrade chocolate? Then check out our Fair Trade page. Looking to join the 70% club? Read more about it here. Or do you just want a decent chocolate cake recipe? We have that too!</p>
</div> <! -- end of bodycontent div -->
Last edited by Auspom; Oct 23, 2008 at 00:58.
There is no rule in your css that says that the color of the font should be changed.
The only rule to change colors is the one for the background. Also for the color of your background you should add the # in front. (Just to follow standards)
If you want to change the color of the font then you need to add the following css rule