• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Cascading and Inheritance > The “Inherit” Keyword

The “Inherit” Keyword

We have seen that inheritance only comes into play after cascading, when there are no rules that apply to an element directly. But, just as the cascading order can be influenced with the !important flag, the importance of inheritance can also be increased. That is done with the keyword inherit.

Whenever you want to make sure that an element inherits a property value from its parent, you can make an explicit rule for that element, and specify inherit as the value of the property. For example:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint