Call us on 01494 614600 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 (16)
Design (20)
Marketing (10)
Random (21)
SEO (15)
Technical (9)

2010

2009

2008

Featured Case Studies

Barnardo's

Barnardo's

Developing an established brand for publicity materials and ongoing marketing.

> View case study

Tims Dairy

Tims Dairy

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

> View case study

Chiltern Brewery

Chiltern Brewery

A stunning new content managed e-commerce website for the Chiltern Brewery.

> 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

> Artlines achieves Recommended Agency status

Published | 1st of September 2010

> BELP redesign launches

Published | 25th of August 2010

> Haywards project launched

Published | 16th of July 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
69 Cressex Enterprise Centre
Cressex Business Park
Lincoln Road
High Wycombe
Buckinghamshire
HP12 3RL

Telephone: 01494 614600
Fax: 01494 980243