Skip to content

Instantly share code, notes, and snippets.

@jameshibbard
Created July 9, 2012 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameshibbard/3074765 to your computer and use it in GitHub Desktop.
Save jameshibbard/3074765 to your computer and use it in GitHub Desktop.
Two column HTML template with basic styling
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple template</title>
<style type="text/css">
<!--
*{
margin: 0;
padding: 0;
}
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
background:#633232;
color: #000;
}
.container {
width: 960px;
background: #FFF;
margin: 0 auto;
}
.header {
padding:10px;
background:#999;
}
.sidebar {
float: left;
width: 190px;
padding:10px 0 10px 10px;
background: #ccc;
}
.sidebar ul{
list-style:none;
}
.content {
padding: 10px 25px 25px 15px;
width: 720px;
float: left;
}
.footer {
background: #999;
position: relative;/* Gives IE6 the hasLayout property, so that clear:both will work */
clear: both;
}
.footer p{
padding:10px;
}
-->
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>Site Heading</h1>
</div> <!-- end .header -->
<div class="sidebar">
<ul class="nav">
<li><a href="#">Hyperlink 1</a></li>
<li><a href="#">Hyperlink 2</a></li>
<li><a href="#">Hyperlink 3</a></li>
<li><a href="#">Hyperlink 4</a></li>
</ul>
</div> <!-- end .sidebar -->
<div class="content">
<h2>Page Heading</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div> <!-- end .content-->
<div class="footer">
<p>Footer text here.</p>
</div> <!-- end .footer -->
</div> <!-- end .container -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment