Two-column layout with header and footer : Two columns « Layout « HTML / CSS






Two-column layout with header and footer

 
<!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">
<head>
<title></title>
<style type="text/css">
body {
 margin: 0;
 padding: 0;
 color: black;
 width: 600px;
 border-right: 1px solid black;
}
#header {
 background-color: #666;
 border-bottom: 1px solid #333;
}
#columnLeft {
 float: left;
 width: 160px;
 margin-left: 10px;
 padding-top: 1em;
}
#columnRight {
 padding-top: 1em;
 margin: 0 2em 0 200px;
}
#footer {
 clear: both;
 background-color: #ccc;
 padding-bottom: 1em;
 border-top: 1px solid #333;
 padding-left: 200px;
}
</style>
</head>
<body>
<div id="header">
<h1>Lorem ipsum dolor sit amet, consectetuer adipiscing elit</h1>
</div>

<div id="columnLeft">
  <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In non velit non ligula laoreet ultrices.</p>
  <h3>Navigation</h3>
  <p>
  <ul>
  <li><a href="">Quisque facilisis</a></li>
  <li><a href="">Nam malesuada ornare dolor</a></li> 
  <li><a href="">Cras gravida</a></li> 
  <li><a href="">Diam sit amet</a></li>
  <li><a href="">Rhoncus ornare</a></li> 
  </ul>
  </p>

</div>

<div id="columnRight">
  <p>Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien. Nam consectetuer. Sed aliquam, nunc eget euismod ullamcorper, lectus nunc ullamcorper orci, fermentum bibendum enim nibh eget ipsum. Donec porttitor ligula eu dolor. Maecenas vitae nulla consequat libero cursus venenatis. Nam magna enim, accumsan eu, blandit sed, blandit a, eros.</p>

  <p>Integer eget sem. Ut vitae enim eu est vehicula gravida. Morbi ipsum ipsum, porta nec, tempor id, auctor vitae, purus. Pellentesque neque. Nulla luctus erat vitae libero. Integer nec enim. Phasellus aliquam enim et tortor. Quisque aliquet, quam elementum condimentum feugiat, tellus odio consectetuer wisi, vel nonummy sem neque in elit. Curabitur eleifend wisi iaculis ipsum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In non velit non ligula laoreet ultrices. Praesent ultricies facilisis nisl. Vivamus luctus elit sit amet mi. Phasellus pellentesque, erat eget elementum volutpat, dolor nisl porta neque, vitae sodales ipsum nibh in ligula. Maecenas mattis pulvinar diam.</p>
</div>

<div id="footer">
  <p>Proin at eros non eros adipiscing mollis. </p>
</div>
  
</body>

</html>

   
  








Related examples in the same category

1.2 column with left content floats left
2.Two columns with a footer
3.Head and footer with two columns in between
4.Header bar, two columns, menu on the right
5.2-column Layout with total width 922px, and float right
6.2-column with total width 922 px and left column 678 px, float right
7.2-column with total width 922px, left width 200px, float right
8.2-column layout with margin in between
9.2-column, with float left and right, left 678px width
10.2-column with relative positioned right column
11.Two column: content and right bar
12.Two column with negative margin
13.Floated Two Column Layout
14.Two columns with separator
15.Two columns with background
16.Two columns with width: 50%
17.Two columns with header banner
18.Two row layout: one floats left, one floats right
19.Header and sub header with two columns and footer
20.float left and right with other content
21.Two columns with header and footer
22.Two columns
23.Master header and two columns
24.Floated Two-Column Layout 2
25.Header and two-column layout
26.Two Column Layout in HTML with table
27.Two Columns Layout Using CSS
28.Two column layout with red theme
29.Two column layout template to illustrate all
30.Two column layout to illustrate all
31.Two column layout template 2
32.Two column layout template 3
33.Two column with text header
34.Two-column with sidebar layout
35.Two even columns