Fixed Box 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 box layout</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type='text/css'>
/*******************************************************
TITLE: Fixed Box Layout V1.0
DATE: 20060809
AUTHOR: The CSS Tinderbox - http://www.csstinderbox.com
*******************************************************/
body {
margin:3em;
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:#eeeeee;
text-decoration:none;
}
blockquote {
margin:1em;
padding:.5em;
background-color:#eeeeee;
border-top:1px solid #cccccc;
border-bottom:1px solid #cccccc;
}
blockquote p {
margin:.2em;
}
#centerColumn {
margin:0 auto;
padding:1em;
width:38em;
text-align:left;
vertical-align: middle;
background-color:#cccccc;
border:1px solid #999999;
}
#centerColumn h2 {
margin:0 0 -.5em 0;
padding:.75em 0 0 0;
font-size:1em;
letter-spacing:.1em;
}
#header {
margin:-1em -1em 0 -1em;
padding:0 0 0 0;
height:5em;
background-color:#ffffff;
}
#header h1 {
margin:0 0 -.6em 0;
padding:.5em 0 0 1em;
font-size:1.5em;
letter-spacing:.1em;
}
#header h2 {
margin:0 0 0 0;
padding:1em 0 0 1.75em;
font-size:.9em;
font-weight:300;
letter-spacing:.1em;
}
#nav {
margin:0 0 1em 0;
padding:.4em 0 0 0;
}
#nav ul {
margin:0;
padding:0;
list-style:none;
}
#nav li {
margin:0;
padding:.25em;
display:inline;
}
#footer {
position:relative;
bottom:0;
margin:5em 0 0 0;
padding:0;
height:4em;
line-height:4em;
text-align:center;
font-size:.7em;
background-color:#cccccc;
border-top:1px solid #999999;
}
</style>
</head>
<body>
<div id="centerColumn">
<div id="header">
<h1>site title</h1>
<h2>fixed box layout</h2>
</div>
<!--//end #headern//-->
<div id="nav">
<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 #nav//-->
<h2>centerColumn</h2>
<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>
<h2>Header 2</h2>
<p><a href="#">Link Item</a></p>
<ul>
<li>List Item</li>
<li>List Item</li>
<li>List Item
<ul>
<li>List Item</li>
<li>List Item</li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>blockquote</strong><br />
Augur et fulgente decorus arcu Phoebus acceptusque novem Camenis, qui salutari levat arte fessos corporis artus.</p>
</blockquote>
<div id="footer"> <a target="_blank" href="http://validator.w3.org/" title="W3C HTML Validation">XHTML</a> | <a target="_blank" href="http://jigsaw.w3.org/css-validator/validator-uri.html" title="W3C CSS Validation">CSS</a> | <a target="_blank" href="http://www.w3.org/TR/WCAG10/" title="Web Content Accessibility Guidelines">WCAG</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