Three column layout with header and footer : Footer « CSS Controls « HTML / CSS






Three column layout with header and footer

 


<?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;
  text-align:center;}

#frame {
  margin-left:auto;
  margin-right:auto;
  text-align:left;
  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;}

/* 3 columns */
.column1of3, .column2of3, .column3of3 {
  float:left;
  width:280px;
  background-color:#cccccc;
  padding:10px;
  margin-top:20px;
  height:173px;}

.column1of3, .column2of3, .columns1and2of3 {margin-right:20px;}

.columns1and2of3, .columns2and3of3 {
  float:left;
  width:600px;
  background-color:#cccccc;
  padding:10px;
  margin-top:20px;}



</style>

  </head> 
  <body>
    <div id="frame">
    <div id="page">

        <div id="header">header</div>
        <div id="navigation">navigation</div>
    
        <div class="column1of3">column 1 of 3</div>
        <div class="column2of3">column 2 of 3</div>
        <div class="column3of3">column 3 of 3</div>

        <div id="footer">footer</div>

      </div>
    </div>
  </body>
</html>

   
  








Related examples in the same category

1.Footer with copyright notice
2.Shading footer with background image
3.Footer with Div
4.Footer with UL
5.Footer 2
6.Footer with background
7.Footer with DIV and UL
8.position: absolute; for Footer
9.Centered footer
10.Top border for Footer
11.Header, footer, navigation bar, and body
12.Without a footer
13.Footer with solid line
14.clear: both; for the footer
15.Footer with background 2
16.Footer DIV position: absolute;
17.Footer with green background
18.Grey link color for footer
19.Two Line footer
20.Grey footer
21.Wide footer
22.Footer with dark background
23.Four-column footer
24.Footer: clear both
25.Large footer with three columns
26.About me column in the footer
27.Footer with smaller font
28.Footer with Two parts
29.Contact information in the footer
30.Multi-line footer
31.using vertical line to separate footer