A lot of people think that the background-color property is also inherited. In fact
this is not the case. The default value for background-color is transparent. This
accomplishes what??™s usually desired anyway, because the parent??™s background color
will be visible through the child element??™s transparent background.
On the other hand, you may want to force the background to be inherited. If so, you
may be able to use the inherit property value (p. 135). The inherit property value
has other uses too; it allows you to increase the weight of an inherited property by
adding it to the author style sheet.
The CSS Property Value inherit
Even though certain characteristics are inherited automatically in CSS, there may
be situations in which you want to increase the weight of the inherited property.
Specifying a value of inherit for any CSS property that??™s applied to an element
will cause the element to gain its parent??™s computed value for the property in
question. By specifying in the author style sheet that a property should inherit its
value, you can increase its weight.
Pages:
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208