Friday, 22 April 2011

Shorthand CSS code

Click for CSS Code
Open or Close Box
body{
font-size:100%;
font-family:Verdana, Arial, Helvetica, sans-serif;
color:#000000;
background-color:#FFFFFF;
}

h1{font-size:1.5em;}
h2{font-size:1.2em; color:#333333;}
h3{font-size:1em; color:#666666;}
h4{font-size:.9em; color:#999999;}
h5{font-size:.8em; color:#CCCCCC;}
h6{font-size:.7em; color:#666600;}

p, blockquote, ul{
font-size:.8em;
}

p{
font-weight:bold;
}

blockquote{
padding:5px;
border:1px solid #999999;
background-color:#DEDEDE;
}

ul{
font-variant:small-caps;
}

The shorthand version of the CSS code should be used where possible. Keeping styling code down to a minimum helps with both page load speed and in the long term when de-bugging code.

In this version you can see that I have cut down the "blockquote" border properties & padding properties. I have also combined the "p, blockquote, ul" tags to share the ".8em" font size.

Website Design | Website Design Company | Web Development
Get a beautiful website design. Studio Web is a results oriented web design & online marketing firm serving companies worldwide.
Sponsored Link