Call us on 01494 372047 Client Login

My standard CSS resets for default element properties

> View all blog entries

Published | 16.01, 30th of March 2009, by Jay Vincent | Technical

Whenever I start a new CSS build, I use a pre-made stylesheet and add to it, rather than create one from scratch. There are a few reasons for this:

Good practise for font-size declarations is to set the size in the body tag using em's or a percentage (not pixels), so a user can over-ride the values using the browser's 'increase text-size' functions. All other font-size declarations should then be made relative to this.

Example:

We want to have a font-size of 12px for the body text and h1 tags of 24px:
note: The browser's default font-size setting is 16px, so 75% amounts to 12px.

body
{
     font-size: 75%;
     font-family: arial, helvetica, sans-serif;
     color: #000;
     background: #fff;
}

h1
{
     font-size: 200%;
}

There are other values and properties which require attention, most notably element margins of block elements, but the best way to find out what CSS works best for you is thorough mulit-browser testing and a passion for web design and self-improvement :)

No comments | Make a comment (Average rating | 4.67 / 5)

Post a comment

Your name *
Your email *
(will not be published)
Your comment *

Blog Entries

Blog Topics

Business (8)
Design (18)
Random (14)
SEO (9)
Technical (11)

2011

2010

2009

2008

Featured Case Studies

Tims Dairy

Tims Dairy

Tims Dairy included online brand development, website build and Content Management System

> View case study

now! microsite for Beadle & Crome

now! microsite for Beadle & Crome

A microsite showcasing specialist hulsta furniture for retailer, Beadle and Crome.

> View case study

Quest Financial Solutions Ltd

Quest Financial Solutions Ltd

Breaking in to the corporate market with stylish publicity.

> View case study

RSS RSS Feed

Share this page

If you found this page useful, perhaps you'd like to bookmark it or share it with the world!

FavouritesAdd to Favourites EmailEmail page to a friend

DiggitDigg it DeliciousDel.icio.us FacebookFacebook MyspaceMySpace GoogleGoogle

Latest News RSS Feed

> We have moved!

Published | 20th of January 2011

> Bringing you up to date.

Published | 29th of November 2010

> Artlines achieves RAR Agency status

Published | 1st of September 2010

Artlines Media

...is a full service creative design agency based in High Wycombe.

We specialise in branding & identity design, website design, development & production, e-commerce, content management systems, search engine optimisation, print design and email marketing campaigns.

Get in touch

From exciting start-ups to corporate brands, our team is always eager to work on the best projects with the best clients.

Artlines Media Ltd
6 Regius Court
Church Road
Penn
High Wycombe
Buckinghamshire
HP10 8RL

Telephone: 01494 372047
Fax: 01494 980243