Friday, February 29, 2008

Baseline Basic CSS Template for Web Development

For every website I build, there comes a time to create the stylesheet. The following is a listing of the simplest stylesheet template that I use for web development. Recall that browsers have their own defaults for elements, and the stylesheet below normalizes these elements.

Simple Default Stylesheet:

h1, h2, h3, h4, h5, h6, p, ul, li
{
padding: 0;
margin: 0;
font-weight: normal;
font-family:Arial, Helvetica, sans-serif;
font-size: 14px;
}

ol, ul, li
{
list-style: none;
}


If you want to set the heading elements for percentages (%) which I often do, here's a suggestion:

h1 {font-size: 170%;}
h2 {font-size: 130%;}
h3 {font-size: 120%;}
h4 {font-size: 100%;}
h5 {font-size: 90%;}
h6 {font-size: 60%;}


Enjoy!



Copyright © 2008 David A. Wank.
I encourage you to send any questions to davidwATshorthillsdesign.com. (replace "AT" with "@")
For website development and personal computer instruction, please visit my website: Short Hills Design.

No comments: