CSS layouts are achieved by using Cascading Style Sheets to dictate the position and magnitude of <div> containers in relation to the web page and in relation to each other. In order to understand this section you will need general knowledge of CSS. With that in mind, I am going to assume you have that knowledge and I will show you how to format your CSS to make columns on a web page. Take a look at the following code:
<head>
<style type="text/css">
#container{ width: 540px; }
#columnone{ float: left;
width: 180px; margin-left: -540px;
background: #FDE95E; font-weight:bold;}
#columntwo{ margin: 0 180px 0 180px; background: #EAEAEA; }
#wrapper{float: left; width: 100%;}
#columnthree{float: left;width: 180px;
margin-left: -180px; background: #C8FC98;}
</style></head><body>
<h2>Columns Using CSS Layouts</h2>
<div id="container">
<div id="wrapper">
<div id="columntwo">
Column Two, Row One<br />Column Two, Row Two
</div></div><div id="columnone">
Column One, Row One<br />Column One, Row Two
</div><div id="columnthree">
Column Three, Row One<br />Column Three, Row Two
</div></div></body>
This may look complicated but it is quite a basic way of achieving columns on your web page. I will now walk you through the code.