Column span for four column layout
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitionalt//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Layout Example</title>
<style type='text/css'>
body {
margin:0px;
background-color:#000000;
font-family:arial, verdana, sans-serif;}
#frame {
margin-left:auto;
margin-right:auto;
width:960px;
background-image:url("images/960px_12_col_grid.gif");
background-repeat:repeat-y;}
#page {
margin:0px 10px 10px 10px;}
#header {
background-color:#cccccc;
padding:10px;
height:120px;}
#navigation {
background-color:#efefef;
padding:10px;
height:40px;}
#footer {
background-color:#cccccc;
padding:10px;
height:40px;
clear:both;
border-top:20px solid #ffffff;}
/* 4 columns */
.column1of4, .column2of4, .column3of4, .column4of4 {
float:left;
width:200px;
background-color:#cccccc;
padding:10px;
margin-top:20px;
height:175px;}
.columns1and2of4 {
float:left;
width:440px;
background-color:#cccccc;
padding:10px;
margin-top:20px;
height:175px;}
.columns2and3and4of4 {
float:left;
width:680px;
background-color:#cccccc;
padding:10px;
margin-top:20px;
height:175px;}
.column1of4, .column2of4, .column3of4, .columns1and2of4 {margin-right:20px;}
</style>
</head>
<body>
<div id="frame">
<div id="page">
<div id="header">header</div>
<div id="navigation">navigation</div>
<div class="column1of4">column 1 of 4</div>
<div class="column2of4">column 2 of 4</div>
<div class="column3of4">column 3 of 4</div>
<div class="column4of4">column 4 of 4</div>
<div class="columns1and2of4">columns 1 and 2 of 4</div>
<div class="column3of4">column 3 of 4</div>
<div class="column4of4">column 4 of 4</div>
<div class="column1of4">column 1 of 4</div>
<div class="columns2and3and4of4">columns 2 and 3 and 4 of 4</div>
<div id="footer">footer</div>
</div>
</div>
</body>
</html>
Related examples in the same category