Cyberpawz
03-24-2007, 11:16 AM
I just purchased the O'reilly book called Head First: HTML with CSS & XHTML because I have decided to bite the bullet and learn HTML again with CSS and XHTML backing up my knowledge... as of now though I am not doing so great, I have come up to a block and I can't see why...
This is the HTML code as per what the book shows me what it should say by now, and it does... the problem is that I should have a tanish background with two margins on either side of the page taking up 20% of the page itself, separated by a 1px dotted grey box around the body of the text.
This is a problem, because I've looked through the first chapter which I am still on, and this code looks fine, yet for some reason it doesn't work. Can anyone see where the mistake is? As far as I know this is a CSS issue, but I can't be too sure, I am new at this, and do need help.
Thanks in advance...
P.S. I am using Safari and SeaMonkey as my test browsers, and both come up with the correct text layout, but the CSS part of it doesn't work...
<html>
<head>
<title>Starbuzz coffee</title>
<style type=”text/css”>
body {
background-color: #d2b48c;
margin-left: 20%;
margin-right: 20%;
border: 1px dotted gray;
padding: 10px 10px 10px 10px;
font-family: sans-serif;
}
</style>
</head>
<body>
<h1>Starbuzz Coffee Beverages</h1>
<h2>House Blend, $1.49</h2>
<p>A smooth, mild blend of coffees from Mexico, Bolivia and Guatemala.</p>
<h2>Mocha Cafe Latte, $2.35</h2>
<p>Espresso, steamed milk and chocolate syrup.</p>
<h2>Cappuccino, $1.89</h2>
<p>A mixture of espresso, steamed milk and foam.</p>
<h2>Chai Tea, $1.85</h2>
<p>A spicy drink made with black tea, spices, milk and honey.</p>
</body>
</html>
This is the HTML code as per what the book shows me what it should say by now, and it does... the problem is that I should have a tanish background with two margins on either side of the page taking up 20% of the page itself, separated by a 1px dotted grey box around the body of the text.
This is a problem, because I've looked through the first chapter which I am still on, and this code looks fine, yet for some reason it doesn't work. Can anyone see where the mistake is? As far as I know this is a CSS issue, but I can't be too sure, I am new at this, and do need help.
Thanks in advance...
P.S. I am using Safari and SeaMonkey as my test browsers, and both come up with the correct text layout, but the CSS part of it doesn't work...
<html>
<head>
<title>Starbuzz coffee</title>
<style type=”text/css”>
body {
background-color: #d2b48c;
margin-left: 20%;
margin-right: 20%;
border: 1px dotted gray;
padding: 10px 10px 10px 10px;
font-family: sans-serif;
}
</style>
</head>
<body>
<h1>Starbuzz Coffee Beverages</h1>
<h2>House Blend, $1.49</h2>
<p>A smooth, mild blend of coffees from Mexico, Bolivia and Guatemala.</p>
<h2>Mocha Cafe Latte, $2.35</h2>
<p>Espresso, steamed milk and chocolate syrup.</p>
<h2>Cappuccino, $1.89</h2>
<p>A mixture of espresso, steamed milk and foam.</p>
<h2>Chai Tea, $1.85</h2>
<p>A spicy drink made with black tea, spices, milk and honey.</p>
</body>
</html>