Visit Mozilla.org

CSS:initial

From MDC

« CSS « CSS Reference

Contents

[edit] Summary

initial is a value that is allowed on every CSS property. It causes the element for which it is specified to use the initial value of the property.

[edit] For non-inherited properties

For non-inherited properties, this reinforces the default behavior, and is only needed to override another rule. For example:

 /* give second-level headers a green border */
 h2 { border: medium solid green }
 
 /* but make those in the sidebar use the value of the color property */
 #sidebar h2 { border-color: initial; }
 /* ...could also be accomplished in CSS1 with 'border: medium solid' */

[edit] For inherited properties

For inherited properties, this behavior is somewhat more unusual since it is not reinforcing the default behavior.

[edit] Specifications

[edit] Browser Compatibility

Supported in Firefox for only some properties (and an increasing number in each version).

[edit] See Also

inherit