Three-Column Layout Demonstration with fixed width : three Columns : Layout HTML CSS TUTORIALS


HTML CSS TUTORIALS » Layout » three Columns »

 

Three-Column Layout Demonstration with fixed width


 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Three-Column Layout Demonstration</title>
<meta http-equiv="Content-Type"
  content="text/html; charset=iso-8859-1" />
<style rel="stylesheet" type="text/css">
#top {
  margin: 20px;
  padding: 10px;
  background: #ccc;
  height: 100px;
}
#wrapper {
  margin: 0 10px;
  padding: 0;
}
#left {
  float: left;
  width: 200px;
}
#right {
  float: right;
  width: 200px;
}
#center {
  margin-left: 210px;
  margin-right: 210px;
  background-color: #ccc;
}
#clear {
  clear: both;
}
#footer {
  background: #ccc;
  margin: 20px;
  text-align: center;
}

div > p {
  margin-top: 0;
}

</style>
</head>
<body>
<div id="top">
  <h1>
    This is the header
  </h1>
</div>
<div id="wrapper">
  <div id="left">
    <p>on the page. </p>
  </div>
  <div id="right">
    <p>two columns. </p>
  </div>
  <div id="center">
    <p>first.</p>
    <p>spacing.</p>
  </div>
  <div id="clear"></div>
</div>
<div id="footer">
  <p>
    This footer should float below the three columns.
  </p>
</div>
</body>
</html

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Layout
» three Columns