Forum Moderators: not2easy
I bought the SitePoint book, Designing Without Tables, and typed in their sample CSS for a 3-column layout with a header -- and it just didn't do what it said it would. Very frustrating!
Here's the CSS:
<STYLE TYPE="text/css">
#header {
background-color: #8080FF;
color: white;
height: 100px;
margin: 20px;
padding: 10px;
}
#center {
margin-left: 220px;
margin-right: 220px;
background-color: #D0D0E2;
color: black;
}
#left {
position: absolute;
left: 10px;
top: 10px;
width: 200px;
background-color: gray;
color: white;
}
#right {
position: absolute;
right: 10px;
top: 10px;
width: 200px;
background-color: gray;
color: white;
}
#footer {
clear: both;
background-color: #8080FF;
color: white;
}
</STYLE>
and here's the HTML:
<html>
<head>
<title></title>
<link rel="stylesheet" href="demo.css" type="text/css" >
</head>
<body>
<div id="header">
<p>Contents of Header</p>
</div>
<div id="left">
<p>Contents of Left</p>
</div>
<div id="center">
<p>Contents of Center</p>
</div>
<div id="right">
<p>Contents of Right</p>
</div>
</body>
</html>
What's up with this? Why doesn't it do a 3 column layout with a header like it does in the book?
Thanks
....Vidya
What specifically is it doing wrong?
Adam