DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Barebones XHTML And CSS Template Pages

  • submit to reddit
        Ok, so this guy already did this: but I needed a bit more.  So this is my xHTML template page (it doesn't declare xml since it makes IE kick out of standards mode):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en" lang="en">
  <title>XHTML TEMPLATE</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="description" content="THIS IS A TEMPLATE XHTML PAGE" />
  <link rel="stylesheet" href="main.css" type="text/css" media="screen" />
  <!-- <script type="text/javascript" src="prototype.js">
  </script> -->
  <script type="text/javascript" language="JavaScript"><!-- <![CDATA[
  // ]]> --></script>
  <div id="container">


This is the accomponying CSS:

body {
  font-family :Verdana, Arial, Sans;
  font-size   :76%;
  margin      :0px; }
div#container {
  font-size   :1.0em; }

.clearfix:after {
    content: "."; 
    display: block; 
    height: 0; 
    clear: both; 
    visibility: hidden;

.clearfix {display: inline-table;}

/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */