CSS - override the default style using the important keyword

By [)ia6l0 iii

You might use more than one rule through CSS on a single element. In such cases, you might like to define the precedence order on the rules.

You can use the !important word after the rule to make it override all others and take precedence.

For example,
padding-bottom: 20px !important; padding-bottom: 25px;

In this case, the 20px value will be used.

Related FAQs

Margins are specified using the margin-top, margin-bottom, margin-left and margin-bottom properties. CSS allows you to specify these properties through a shorthand notation too.
In CSS , we specify the color using the hexadecimal notation: # followed by the six digits.
Padding properties are specified using the Padding-Top, Padding-Bottom , Padding-Left and Padding-Right. CSS allows you to use a shorthand technique to specify these.
You can use apply more than one class to an Element at the same time.
You might use more than one rule through CSS on a single element. In such cases, you might as well like to define the precedence order on the rules.
CSS - override the default style using the important keyword  (1143 Views)