Compression v1.4

Compression is a light weight class that will load a CSS stylesheet, bind and translate given variables, compress and remove white space and cache the output for future use.

Easily resetting your stylesheets

Tuesday, April 14th 2009, 12:50am
Topics: Tutorials, HTML & CSS
Tags: Css, Reset
Views: 761, Comments: 1

I always hear talk about reset CSS, and how every website should encompass them. I mean it is everywhere. I honestly never found the use or reasoning to include an additional stylesheet, just to render elements as "dull". I simply use the code below to reset only elements I need to worry about, or ones that are used as the majority.

html, body, div, img, form, fieldset, ul, ol, li, h1, h2, h3 {
    border: none;
    padding: 0;
    margin: 0;
}


I personally like the way some elements are styled by default, mainly the table and its child elements. I use to use the global declaration of * to reset ALL elements in the page, but that caused weird and unexpected styling issues that I did not like. But to simply put it, its all a matter of personal preference, and to me you should only reset elements that are actually used (this also saves a few bytes on the filesize, boosh!).
Related Entries:

1 Comments

10 / 2 = ?
Allowed: [code] [b] [i] [u]
  • Drinkspiller
    www.cannon...agency.com
    Apr 16th 2009, 06:51
    1 Hey Miles,

    I prefer Ed Eliot's mentioned here:
    http://www.css-reset.com/

    A more succinct way to accomplish similar (by adding the border definition yours incorporates) is in the Reset Everything approach at that same link.

    Cheers!