- Apr 17, 2008
- 170
- 1
- 81
I'm on my very first lesson with CSS. I'm using the book titled "Head First HTML with CSS & XHTML." I completed the first HTML lessons successfully. I type the HTML onto Notepad and it comes out fine.
The problem is when I modify the same document with CSS (in order to get margins, background-color, etc) the modifications to CSS are not recognized by my web browser.
I made two attempts and both attempts failed. The first attempt was made when I typed the CSS in. The second attempt was made when I copied the CSS straight out of the text book. I then pasted it to Notepad. I then closed it. I then hit my refresh button. But the CSS portion is not recognized/read by IE8. Is there a setting I'm supposed to set in my web browser? Below is the super simple CSS lesson that my browser for some reason fails to recognize:
<html>
<head>
<title>Starbuzz Coffees Mission</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 Coffees Mission</h1>
<p>To provide all the caffeine that you need to power your life.</p>
<p>Just drink it.</p>
</body>
</html>
The problem is when I modify the same document with CSS (in order to get margins, background-color, etc) the modifications to CSS are not recognized by my web browser.
I made two attempts and both attempts failed. The first attempt was made when I typed the CSS in. The second attempt was made when I copied the CSS straight out of the text book. I then pasted it to Notepad. I then closed it. I then hit my refresh button. But the CSS portion is not recognized/read by IE8. Is there a setting I'm supposed to set in my web browser? Below is the super simple CSS lesson that my browser for some reason fails to recognize:
<html>
<head>
<title>Starbuzz Coffees Mission</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 Coffees Mission</h1>
<p>To provide all the caffeine that you need to power your life.</p>
<p>Just drink it.</p>
</body>
</html>