This method follows a similar approach to Tatu's, but includes:
- a header
- a footer
- fluid width instead of fixed sizes for better responsiveness
- columns with full height background colors
- additional divs to pad the content in the columns
You can experiment with it on jsfiddle: http://jsfiddle.net/BzaSL/
HTML:
<div id="header">First: Header</div>
<div id="wrapper">
<div id="content-wrapper">
<div id="content">
<div id="contentpad">
<h2>Second: Content</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus turpis dui, porta consectetur dictum id, rhoncus non turpis. Praesent vitae fermentum enim. Donec consequat accumsan nibh et tempor. Duis sem enim, interdum eget vestibulum vitae, semper ac arcu. Maecenas convallis imperdiet libero, bibendum vulputate nulla tempus in. Duis eu purus eget lectus tincidunt fermentum. Vestibulum sit amet nunc et metus auctor ullamcorper. Vestibulum ut dui purus, nec hendrerit orci. Aliquam erat volutpat. Praesent a nibh vitae enim fringilla aliquam.</p>
</div>
</div>
<div id="leftcol">
<div id="leftcolpad">
Third: Left column
</div>
</div>
</div>
<div id="rightcol">
<div id="rightcolpad">
Fourth: Right column
</div>
</div>
</div>
<div id="footer">Fifth: Footer</div>
CSS:
/* The wrapper holds all three columns and spans 100% of the page width.
* The background color applies to the right column.*/
#wrapper { width: 100%; margin: 0 auto; background-color:#CCFFFF; }
/* Clear floating elements before the footer */
#wrapper:after { display: block; content: ""; clear: both; }
/* The content-wrapper represents the left two columns, occupying 80% of the wrapper's width.
* The background color applies to the left column */
#content-wrapper { float: left; width:80%; background-color:#FFFFCC; }
/* The content occupies 75% of the content-wrapper's width */
#content { width: 75%; float: right; background-color:#FFCCFF; }
/* The left column takes up the remaining 25% of the content-wrapper's width */
#leftcol { width: 25%; float: left; }
/* The right column occupies 20% of the wrapper's width */
#rightcol { float: left; width: 20%; }
/* Applying padding or margin directly to the columns might disrupt the layout */
#contentpad, #leftcolpad, #rightcolpad, #footer, #header{ padding:1em; }
#footer{ background-color:#CCCCFF; }
#header{ background-color:#FFCCCC; }