When the Freeman's give the first CSS lesson on page 30 (I show their exact format at the end of this post) you can clearly see CSS working in their web browser as the the book has color images. You can also see the CSS add margins as you would expect CSS to do.
But things are different in my web browser. when I 1) type the code in by hand into Notepad or 2) copy and paste the code in by hand into Notepad the HTML portion is read by my web browser but the CSS portion is not. The CSS portion is ignored/is not read/does not show. But again, the HTML portion is fine.
Anyone know why? Here's the exact format, as created by the Freeman's and taken from their book, that I'm talking about:
<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 Caffe 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 milk foam.</p>
<h2>Chai Tea, $1.85</h2>
<p>A spicy drink made with black tea, spices, milk and honey.</p>
</body>
</html>
This post has been edited by Andrew: 02 December 2011 - 01:26 PM
Reason for edit: Mod Edit: Add [code] tags for readability - AA

Help

Back to top










