1. Computing

Discuss in my forum

How to Use CSS Positioning to Create Layouts Without Tables

The CSS

By , About.com Guide

This is the CSS for a 3-column layout without using any tables.

See the HTML for the layout.
Return to the Tableless Layouts - Using CSS Positioning to Lay Out Web Pages article.

body {
  margin : 0;
  padding : 0;
  border-color : #cc0000;
  background-color : #ffffff;
  color : #000000;
}
p, ul, ol, li {
  font : 10pt Arial,geneva,helvetica;
}
h1 {
  font : bold 14pt Arial, Helvetica, geneva;
}
h2 {
  font : bold 12pt Arial, Helvetica, geneva;
}
#leftnavigation {
  position : absolute;
  left : 0;
  width : 150px;
  margin-left : 10px;
  margin-top : 20px;
  color : #000000;
  padding : 3px;
}
#rightnavigation {
  position : absolute;
  left : 80%;
  top : 20px;
  width : 140px;
  padding-left : 10px;
  z-index : 3;
  color : #000000;
  padding : 3px;
}
#content {
  top : 0px;
  margin : 0px 25% 0 165px;
  padding : 3px;
  color : #000000;
}
#content h1, #content h2 {
  color : #cc0000;
}

See the HTML for the layout.
Return to the Tableless Layouts - Using CSS Positioning to Lay Out Web Pages article.

©2013 About.com. All rights reserved.