Picnic Website Code Tutorials

Three Column Fixed|Fluid|Fixed #3 - Website Template Tutorial

View Demo

This is a somewhat simple three column layout with non-equal height columns, and therefore uses no images. It comes shipped with a 100% height, header, sticky footer, and a fluid center with a min/max width wrapper in all browsers including IE6. It currently has a min-width of 680px and max-width of 1280px. However, it can easily be changed to whatever value you see fit.

Alternatively, we can add a little javascript to this same layout to simulate equal height columns!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Three Column Fluid #3</title>
<style type="text/css">
<!--
/* ----------------------------------------------------
Style: Three Column Fixed|Fluid|Fixed #3
Author: Eric Watson
Website: http://www.websitecodetutorials.com
------------------------------------------------------- 
: Site Colors : 

: Table Of Contents :
Resets
Defaults
Typography
Forms
Layout
Links
Menus
Global Classes
Content
---------------------------------------------------- */

/* -------------------- Resets --------------------- */
body, address, blockquote, dl, ol, ul, li, form, fieldset, h1, h2, h3, h4, h5, h6, p, pre {
	margin: 0;
	padding: 0;
}
fieldset, table {
	border: none;
}
a {
	outline: 0;
}
/* --------------- Document Defaults -------------- */
html {
	font-size: 100.01%;
	height: 100%;
}
body {
	height: 100%;
	font: 62.5%/1.5 Tahoma, Arial, Helvetica, 'MS Sans Serif', sans-serif;
	color: #333;
	background: #CCC;
}
/* ------------------ Typography ------------------- */
h1 {
	font-size: 3em;
	font-family: Arial;
	font-weight: normal;
	line-height: 3.5;
	text-align: center;
}
h2 {
	font-size: 1.8em;
	padding: 20px 0 0;
}
h3 {
	font-size: 1.6em;
	margin: 70px 0 0;
}
p {
	font-size: 1.2em;
	margin: 0 0 1em;
	text-align: justify;
}
/* -------------------- Layout --------------------- */
#wrapper {
	margin: 0 auto;
	min-width: 680px;
	max-width: 1280px;
	min-height: 100%;
}
#left {
	float: left; 
	width: 200px;
	height: 250px;
	text-align: center;
	background: #999;
}
#header {
	background: #666;
}
#right {
	float: right;
	width: 200px;
	height: 250px;
	text-align: center;
	background: #999;
}
#content {
	margin: 50px 220px; /* makes space for the right/left columns */
}
#clearfooter { 
	height: 70px;
	clear: both;
}
#footer {
	height: 70px;
	text-align: center;
	margin: -70px auto 0 auto;
	background: #666;
	min-width: 680px;
	max-width: 1280px;
}
/* --------------------- Links ---------------------- */

/* --------------------- Menus ---------------------- */
/* Main Menu */

/* Footer Menu */

/* ---------------- Global Classes ----------------- */

/* ----------------- Content/Pages ----------------- */
-->
</style> 
<!--[if IE 6]>
<style type="text/css">
#wrapper {
	height: 100%;
}
#wrapper, #footer {
	width: 1024px;
	width: expression(document.body.clientWidth <684? "680px" : document.body.clientWidth > 1284? "1280px" : "auto");
}
</style>
<![endif]-->
</head>

<body>
<div id="wrapper">

<div id="header">
<h1>Header</h1>
</div>

<div id="left">
<h3>Left</h3>
</div>

<div id="right">
<h3>right</h3>
</div>

<div id="content">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque tempor. Nam in libero vel nisi accumsan euismod. Quisque quis neque. Donec condimentum, enim convallis vestibulum varius, quam mi accumsan diam, sollicitudin ultricies odio ante vitae purus. Etiam ultricies quam. Vestibulum turpis turpis, fermentum ut, accumsan quis, tempor at, ipsum. Nam felis elit, sollicitudin id, ultrices faucibus, fringilla vel, dui. Aliquam tincidunt iaculis eros. Sed in lorem. Nullam eu enim. Quisque tristique pretium diam. Fusce tempor sollicitudin ligula. Donec purus eros, mattis quis, mattis vestibulum, congue quis, felis. Nulla facilisi. Nam ultricies posuere justo. In feugiat.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque tempor. Nam in libero vel nisi accumsan euismod. Quisque quis neque. Donec condimentum, enim convallis vestibulum varius, quam mi accumsan diam, sollicitudin ultricies odio ante vitae purus. Etiam ultricies quam. Vestibulum turpis turpis, fermentum ut, accumsan quis, tempor at, ipsum. Nam felis elit, sollicitudin id, ultrices faucibus, fringilla vel, dui. Aliquam tincidunt iaculis eros. Sed in lorem. Nullam eu enim. Quisque tristique pretium diam. Fusce tempor sollicitudin ligula. Donec purus eros, mattis quis, mattis vestibulum, congue quis, felis. Nulla facilisi. Nam ultricies posuere justo. In feugiat.</p>
</div>

<div id="clearfooter">
</div>

</div><!-- end #wrapper -->

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

</body>
</html>
		

Sponsors

Top Donators

Friends of Mine