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

Chapter 33. Styling for HTML Elements > The !important Style Sheet Attribute

The !important Style Sheet Attribute

Style sheet rules can always have their “importance” bumped up. By appending the word !important to a rule, it sends a message to the browser that nonimportant rules must bend to this one. This is a quick way to get around inheritance issues and assure dominance of a particular declaration you care about (unless another styling rule overriding yours also has !important attached to it).

Listing 33.7 shows how !important can dominate a style sheet arrangement.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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