Picnic Website Code Tutorials

Style: Practical - Website Template Tutorial

View Demo

This layout is centered, has a 100% height, with a header, sticky footer, and a left floated fixed height column. It's practical, and as always, completely bullet proof!

<!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>Style: Practical</title>
<style type="text/css">
<!--
/* ----------------------------------------------------
Style: Practical
Author: Eric Watson
Website: http://www.DiscountSiteDesign.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;
}
/* --------------- 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;
	background-color: #CCC;
	color: #333;
}
/* ------------------ Typography ------------------- */
h1 {
	font-size: 2.4em;
	text-align: center;
	padding: 38px 0 0;
}
h2 {
	font-size: 2em;
	text-align: center;
	margin: 95px 0 0;
}
h3 {
	font-size: 2em;
	text-align: center;
	margin: 17px 0 0;
}
p {
	font-size: 1.2em;
	margin: 0 0 1em; 
}
/* -------------------- Forms ---------------------- */

/* -------------------- Layout --------------------- */
* html #wrapper {
	height: 100%;
}
#wrapper {
	min-height: 100%;
	position:relative;
	margin: 0 auto;
	width: 765px;
	border-left: #000 solid 1px;
	border-right: #000 solid 1px;
}
#header {
	height: 120px;
	background: #666;
	border-bottom: #000 solid 1px;
}
#content {
	padding: 20px 20px 20px 220px;
}
#left {
 	float: left;
	width: 200px;
	height: 250px;
	background: #999;
	border-right: #000 solid 1px;
	border-bottom: #000 solid 1px;
}
#clearfooter {
	height: 70px;
	clear: both;
}
#footer {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 70px;
	background: #666;
	border-top: #000 solid 1px;
}
/* ------------------- Links ---------------------- */

/* ------------------- Menus ---------------------- */

/* Main Menu */

/* Footer Menu */

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

/* ----------------- Content/Pages ----------------- */
-->
</style> 
</head>

<body>
<div id="wrapper">

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

<div id="left">
<h2>Left</h2>
</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>Ut lacus neque, interdum in, nonummy ac, placerat a, lorem. In interdum vulputate lectus. Aenean libero elit, eleifend id, tincidunt id, tristique eu, tortor. Pellentesque urna dolor, placerat a, pharetra eget, congue ut, ligula. Sed mi. Nunc volutpat. Donec pharetra accumsan lacus. Integer pede orci, vehicula vitae, porttitor id, pulvinar vel, nisi. Aliquam mauris ligula, eleifend sit amet, eleifend sit amet, luctus at, turpis. Sed neque orci, tincidunt id, tempus condimentum, eleifend a, nisl. Etiam auctor. Donec lectus lacus, consequat ac, ultrices venenatis, imperdiet vel, erat. In porttitor augue at tellus commodo pharetra.</p>
</div>

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

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

</div><!-- end #wapper -->
</body>
</html>
		

Need help adding this or other code to your website? Post it here in the forum! Forum

Sponsors

Top Donators

Friends of Mine