CSS Reset

Purpose:

 

To dismiss problems that may be caused by browsers’ default style. We use a css script to override the default style, so that they will behave all the same in different kind of browsers.

 

Examples:

 

1. Most commonly used:

*{
margin:0;
padding: 0;
}

It will dismiss most of the padding, margin problems. Although it is no longer considered as that cool as described here: http://css-tricks.com/margin-0-padding-0-no-longer-cool/

 

2. Example from http://www.apple.com/support/

html, body, div, ul, ol, li, dl, dt, dd, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, fieldset, input {
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4, h5, h6, pre, code, address, caption, cite, code, em, strong, th {
    font-size: 1em;
    font-style: normal;
    font-weight: normal;
}
ul, ol {
    list-style: none outside none;
}
fieldset, img {
    border: medium none;
}
caption, th {
    text-align: left;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

 

3. Other CSS Reset script

http://www.cssreset.com/

你可能感兴趣的:(reset)