Simple 2 column div layout [css]

Simple 2 column layout with a header using css.

The HTML

<html>
<link rel="stylesheet" type="text/css" href="style.css" />

<div id="wrap">
<div id="header"> HEADER</div>
<div id="sidebar"> SIDEBAR</div>
<div id="main"> BODY</div>
</div>

</html>
div#wrap
{
 margin:0px auto;
 width:800px;
}

div#header
{
width:800px;
height:30px;
float:left;
}

div#sidebar
{
width:100px;
float:left;
height:30px;
}


div#main
{
width:700px;
height:30px;
float:left
}

RESULT [copying image of this http://www.james-blogs.com/2009/05/15/website-layouts-with-sidebars/]
[so result is actually sidebar first then content]
layout


No Comments to “Simple 2 column div layout [css]”  

  1. No Comments

Leave a Reply