Fixed Three-Column Over Four-Column Layout
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Fixed 3-column over 4-column layout (basic)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type='text/css'>
/*******************************************************
TITLE: Fixed Three-Column Over Four-Column Layout V1.0
DATE: 20060807
AUTHOR: The CSS Tinderbox - http://www.csstinderbox.com
*******************************************************/
body {
margin:.5em;
padding:0;
height:100%;
background-color:#ffffff;
color:#000000;
text-align:center;
font-family:Arial, Helvetica, sans-serif;
font-size:.9em;
}
a {
color:#cc0000;
text-decoration:underline;
}
a:hover {
color:#616161;
text-decoration:none;
}
blockquote {
margin:1em;
padding:.5em .5em .5em 85px;
background-color:#D7ECF8;
}
blockquote p {
margin:.2em;
color:#000000;
}
hr {
margin-bottom:20px;
border:none;
width:99%;
color:#eeeeee;
background-color:#eeeeee;
height:1px;
clear:both;
}
td.desc {
padding:4px;
text-align:left;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:.7em;
}
#postHeader {
margin:0 auto;
padding:0 .2em .3em .2em;
width:720px;
text-align:right;
vertical-align: middle;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:.7em;
text-transform:uppercase;
}
#centerColumn {
margin:0 auto;
padding:1em;
width:720px;
text-align:left;
vertical-align: middle;
background-color:#ffffff;
}
#centerColumn h2 {
margin:0 0 -.5em 0;
padding:.75em 0 0 0;
font-family:Georgia, "Times New Roman", Times, serif;
font-size:1.1em;
}
#centerColumn h3 {
margin:0 0 -.5em 0;
padding:.75em 0 0 0;
font-size:.8em;
font-weight:lighter;
letter-spacing:.1em;
}
#navbar {
margin:-1em -1em 0 -1em; /* Mozzila attributes */
padding:1em 0 1em 0 !important; /* IE specific attributes */
padding:1em 0 0 0;
background-color:#cccccc;
}
#navbar ul {
margin:0 0 -1em .3em !important;
margin:.3em 0 0 .3em;
padding:0 0 1em 0;
list-style:none;
background-color:#cccccc;
}
#navbar li {
margin:0 0 0 -.27em;
padding:.2em 0 .2em 0 !important;
padding:1em 0 1em 0;
list-style:none;
display:inline;
background-color:#cccccc;
}
#navbar li a {
margin:0 0 0 0;
padding:1em .5em 1em .5em !important;
padding:1em .5em 0 .5em;
}
#header {
margin:0 -1em 0 -1em;
padding:0 0 0 0;
height:143px;
background-color:#cccccc;
border-top:1px solid #ffffff;
}
#header h1 {
margin:0 0 -14px 10px;
padding:10px 0 0 .9em;
font-family:Georgia, "Times New Roman", Times, serif;
font-size:1.7em;
font-weight:lighter;
letter-spacing:.15em;
color:#000000;
}
#header h2 {
margin:0 0 0 0;
padding:1em 0 0 30px;
font-size:.9em;
font-weight:300;
letter-spacing:.1em;
color:#000000;
}
#cell_1 {
margin:0 5px 1em 0;
padding:8px;
float:left;
width:210px;
background-color:#cccccc;
}
#cell_2 {
margin:0 14px 1em 14px;
padding:8px;
float:left;
width:210px;
background-color:#cccccc;
}
#cell_3 {
margin:0 0 1em 5px;
padding:8px;
float:left;
width:210px;
background-color:#cccccc;
}
#cell_1 p, #cell_2 p, #cell_3 p {
font-size:.75em;
color:#000000;
}
#cell_1 h2 {
margin:0 0 -4px 0 !important;
margin:0 0 -20px 0;
padding:4px 0 10px 0;
font-family:Georgia, "Times New Roman", Times, serif;
color:#000000;
font-weight:bold;
}
#cell_2 h2 {
margin:0 0 -4px 0 !important;
margin:0 0 -20px 0;
padding:4px 0 10px 0;
font-family:Georgia, "Times New Roman", Times, serif;
color:#000000;
font-weight:bold;
}
#cell_3 h2 {
margin:0 0 -4px 0 !important;
margin:0 0 -20px 0;
padding:4px 0 10px 0;
font-family:Georgia, "Times New Roman", Times, serif;
color:#000000;
font-weight:bold;
}
.barepic {
border:none;
}
.right {
float:right;
margin:5px;
padding:2px;
}
.left {
float:left;
margin:5px;
padding:2px;
}
.center {
width:auto;
margin-left:auto;
margin-right:auto;
}
.news em {
font-size:.8em;
color:#000000;
}
#cell_1 ul.news, #cell_2 ul.news, #cell_3 ul.news {
margin:0 0 0 5px;
padding:0 0 0 0;
list-style:none;
}
#cell_1 li.news, #cell_2 li.news, #cell_3 li.news {
margin:0 0 .3em 0;
padding:5px 0 6px 10px;
font-size:.75em;
}
#cell_1 ul, #cell_2 ul, #cell_3 ul {
margin:0 0 0 5px;
padding:0 0 0 0;
list-style:none;
}
#cell_1 li, #cell_2 li, #cell_3 li {
margin:0 0 .3em 0;
padding:5px 0 6px 5px;
font-size:.75em;
}
#box_1 {
margin:0 5px 2em 0;
padding:8px;
float:left;
width:150px;
background-color:#cccccc;
}
#box_2 {
margin:0 7px 2em 14px;
padding:8px;
float:left;
width:150px;
background-color:#cccccc;
}
#box_3 {
margin:0 14px 2em 7px;
padding:8px;
float:left;
width:150px;
background-color:#cccccc;
}
#box_4 {
margin:0 0 2em 5px;
padding:8px;
float:left;
width:150px;
background-color:#cccccc;
}
#box_1 p, #box_2 p, #box_3 p, #box_4 p {
font-size:.75em;
color:#000000;
}
#box_1 h2, #box_2 h2, #box_3 h2, #box_4 h2 {
font-family:Georgia, "Times New Roman", Times, serif;
color:#000000;
font-size:.8em;
}
#box_1 ul, #box_2 ul, #box_3 ul, #box_4 ul {
margin:0 0 0 5px;
padding:0 0 0 0;
list-style:none;
}
#box_1 li, #box_2 li, #box_3 li, #box_4 li {
margin:0 0 .3em 0;
padding:5px 0 0 5px;
font-size:.8em;
}
#footer {
position:relative;
clear:both;
bottom:0;
margin:5em 0 0 0;
padding:0;
height:4em;
line-height:4em;
text-align:center;
font-size:.7em;
background-color:#ffffff;
}
</style>
</head>
<body>
<div id="postHeader"> <a href="#">Links ››</a> <a href="#">Site Map ››</a> <a href="#">Contact ››</a> </div>
<!--//end #postHeader//-->
<div id="centerColumn">
<div id="navbar">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<!--//end #navbar//-->
<div id="header">
<h1>site title</h1>
<h2>fixed 3-column over 4-column layout</h2>
</div>
<!--//end #headern//-->
<h2>centerColumn</h2>
<h3>sub heading</h3>
<p>Augur et fulgente decorus arcu Phoebus acceptusque novem Camenis, qui salutari levat arte fessos corporis artus, si Palatinas videt aequos aras remque Romanam Latiumque felix alterum in lustrum meliusque semper prorogat aevom, quaeque Aventinum tenet Algidumque, quindecim Diana preces virorum curat et votis puerorum amicas adplicat auris.</p>
<hr />
<div id="cell_1">
<h2>cell_1</h2>
<p class="news">Quindecim Diana preces virorum curat et votis puerorum amicas adplicat auris.</p>
<ul class="news">
<li class="news"><a href="#">Link</a><br />
<em>Date<br />
Puerorum amicas adplicat auris.</em></li>
<li class="news"><a href="#">Link</a><br />
<em>Date<br />
Puerorum amicas adplicat auris.</em></li>
</ul>
</div>
<!--//end #cell_1//-->
<div id="cell_2">
<h2>cell_2</h2>
<p>Augur et fulgente decorus arcu Phoebus acceptusque novem Camenis, qui salutari levat arte fessos corporis artus, si Palatinas videt aequos aras remque.</p>
<p>Romanam Latiumque felix alterum in lustrum meliusque semper prorogat aevom, quaeque Aventinum tenet Algidumque, quindecim Diana preces virorum curat et votis puerorum amicas adplicat auris.</p>
</div>
<!--//end #cell_2//-->
<div id="cell_3">
<h2>cell_3</h2>
<p>Augur et fulgente decorus arcu Phoebus acceptusque novem Camenis, qui salutari levat arte fessos corporis artus, si Palatinas videt aequos aras remque.</p>
<p>Romanam Latiumque felix alterum in lustrum meliusque semper prorogat aevom, quaeque Aventinum tenet Algidumque, quindecim Diana preces virorum curat et votis puerorum amicas adplicat auris.</p>
</div>
<!--//end #cell_3//-->
<hr />
<div id="box_1">
<h2>box_1</h2>
<p>Quindecim Diana preces virorum curat et votis puerorum amicas adplicat auris.</p>
<ul>
<li><a href="#">Link…</a></li>
</ul>
</div>
<!--//end #box_1//-->
<div id="box_2">
<h2>box_2</h2>
<p>Quindecim Diana preces virorum curat et votis puerorum amicas adplicat auris.</p>
<ul>
<li><a href="#">Link…</a></li>
</ul>
</div>
<!--//end #box_2//-->
<div id="box_3">
<h2>box_3</h2>
<p>Quindecim Diana preces virorum curat et votis puerorum amicas adplicat auris.</p>
<ul>
<li><a href="#">Link…</a></li>
</ul>
</div>
<!--//end #box_3//-->
<div id="box_4">
<h2>box_4</h2>
<p>Quindecim Diana preces virorum curat et votis puerorum amicas adplicat auris.</p>
<ul>
<li><a href="#">Link…</a></li>
</ul>
</div>
<!--//end #box_4//-->
<div id="footer"> Copyright, © 2005-2006 <a href="#">Company Name</a> | <a target="_blank" rel="nofollow" href="http://www.csstinderbox.com">The CSS Tinderbox</a> </div>
<!--//end #footer//-->
</div>
<!--//end #centerColumn//-->
</body>
</html>
Related examples in the same category