Ch 2 example 2-5 question
Hi Richard:
I have just started working from your book "Beginning CSS for Web Design" and kutos to you. Nice job, easy to read and understand concepts about CSS thus far. That said, I am running across a problem with example 2-4 and 2-5. For some reason, not sure yet, I am not seeing the border around the table in example 2-5. When I remove the declaration from the beginning of the file (just like in example 2-4), my border is there. I am using IE 6, Windows XP Pro, SP2 and have all patches loaded, if that that makes any difference. I have also attached my code, which I copied directly out of your book.
Any ideas???
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EM"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>DocType Sniffing</title>
<style type='text/css' media='all'>
table { margin: auto; }
td { background: green;
margin: 10%;
border: 5ps solid yellow;
padding: 10%;
width: 100%;
color: black;
font-size: 200%;
text-align: center; }
div { background: green;
border: 5px solid yellow;
font-size: 200%;
padding: 1%; }
#div1 { float: left;
width: 30% }
#div2 { margin-left: 34%;
width: auto; }
</style>
</head>
<body>
<table>
<tr>
<td>Some Content</td>
</tr>
</table>
<div id='div1'>This division smells funny</div>
<div id='div2'>This division has a <em>strange</em> and
rather pleasing odor about it.</div>
</br>
<p>I have tried several different DTD's with this example and the
results was the same in every case. Changing the declaration three
different ways didn't seem to have any effect on the results. What I do
not understand, is why there is no black (yellow) border around the
table?</p>
</br>
<p>When the declarations are removed from the beginning of the file, my
border returns and all is well.</p>
</br>
<p>In this example I am using IE 6.</p>
</body>
</html>
|