attribute used to supersede any of the contradictory styles with equal weight

manisingla44's Avatar
Newbie Member
Question:
Which of the following attributes can be used to supersede any of the contradictory styles with equal weight?


a. !supersede
b. !high
c. !important
d. !key
0
mugnebot's Avatar
Go4Expert Member
Answer:
c. !important
0
mugnebot's Avatar
Go4Expert Member
Using !important with CSS

The CSS !important declaration is something I've seen in CSS code before but never knew what it meant until a few days ago, so I thought I'd write a post looking at !important to show what it does.

CSS rules marked !important take precedence over later rules. Normally in CSS the rules work from top to bottom, so if you assigned a new style to an element further down the style sheet or in a secondary style sheet then the later rule would take precedence. !important ensures that this rule has precedence.