What is the .bottom div for? - the name does not match the purpose. The .container div can do what it says and contain the whole site, and auto side margins will centre the site. The .header does not need to be floated, nor a width set. Neither does the .footer, which has its clear property set to appear below the floats.
I also question the use of the XHTML transitional doctype - why?
Try:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>3 Column CSS Layout - parellel design</title>
<style type='text/css'>
body {
border: 0;
padding: 0px;
margin: 0px;
font-size: 90%
background-color: #cccccc;
}
.container{
width: 860px;
margin: 0 auto;
}
.header{
height: 150px;
background-color: #6699cc
}
.left{
float: left;
width: 140px;
background-color: #ccccff
}
.middle{
float: left;
width: 560px;
background-color: #ccccff;
margin-left: 10px;
}
.right{
float: right;
width: 140px;
background-color: #ccccff
}
.footer{
height: 20px;
background-color: #cfcfcf;
clear: both;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="container">
<div class="header"> header </div>
<div class="left"> left1 </div>
<div class="middle"> left2 </div>
<div class="right"> right </div>
<div class="footer"> footer </div>
</div>
</body>
</html>
Bookmarks