Removing a browsers default CSS settings

I found an article a while ago by Adrian Senior called CSS: Getting Into Good Coding Habits. This is an excellent article, but the part I have found very useful is where he discusses removing the browsers default settings. I have reproduced a slightly modified version below. I now use this as a starting point for stylesheets on evey new site I develop:

html, body, ul, ol, li, p, 
h1, h2, h3, h4, h5, h6, 
form, fieldset, a { 
margin: 0; 
padding: 0; 
border: 0; 
}
body {
font-size: 100.01%; /* Fix for some browser bugs */
background-color: #ffffff;
}
h1, h2, h3, h4, h5, h6 {
font-weight:normal;
font-size:100%;
}
This entry was posted in Web Development and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

6 Comments

  1. Posted October 30, 2007 at 5:20 am | Permalink
  2. Posted October 31, 2007 at 2:38 am | Permalink

    Great Sebastiaan, thanks for the link!

  3. Posted June 22, 2009 at 2:06 pm | Permalink

    Thanks mate. Might help my Ie / firefox weirdnes.

  4. Posted February 4, 2010 at 4:11 pm | Permalink

    Very usefull when creating a new template… This will fix most IE annoyances too!

  5. Nayana adassuriya
    Posted May 20, 2010 at 5:10 am | Permalink

    this is very help full

    fallowing link also may help to you

    http://webdesign.about.com/od/css/a/master_stylesht_2.htm

    thank you

    Nayana Adassuriya

  6. Posted May 20, 2010 at 5:37 am | Permalink

    Hi Nayana, thanks for the link. These days I am using Eric Meyers CSS reset:

    http://meyerweb.com/eric/tools/css/reset/

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">