Web Designing-Default values
Wednesday, July 16th, 2008You can often eliminate the need to specify a value for a property by taking advantage of that property’s default value. This is especially important to consider when you use shorthand properties, since any unset properties are assigned the default values of the corresponding individual property.
Some common default values are 0 for padding (though there are exceptions to this), and transparent for background-color.
Since there are slight differences in the default values between browsers, some people like doing a Global white space reset by zeroing both margin and padding for all elements at the top of their stylesheets:
1. * {
2. margin:0;
3. padding:0;
4. }