Prev | Current Page 197 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"


The Cascade, Specificity, and
Inheritance
Internet Explorer Support for inherit
Internet Explorer 7 and earlier versions don??™t support the value inherit for any
properties other than direction (p. 343) and visibility (p. 273).
The Ultimate CSS Reference 136
Normally, in the absence of any applicable declaration, the color property is
inherited. However, in the case of anchor elements, the color property is commonly
set to blue in the user agent style sheet. If you wanted to reinforce the importance
of the inherited value, you could use the value inherit in an author or user style
sheet, overwriting the user agent style sheet declaration. In the following example,
we set the foreground color of the p element to #000, or black, and specify that any
child anchor elements should inherit the value of the foreground color from their
parent element:
p {
color: #000;
}
p a:link {
color: inherit;
}
When you??™re using shorthand notation such as background, you can??™t mix inherit
with other values.


Pages:
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209