- !important - forces a style attribute
- Example:
#example p
{ color: blue; }
...
#example p
{ color: red; }
The later rule overrides the earlier rule, and paragraphs within #example will be red. - However:
#example p
{ color: blue!important; }
...
#example p
{ color: red; }
The first rule now has precedence so the later rule is ignored and the paragraph will be blue. - To ensure padding doesn't increase the size of the container use:
box-sizing: border-box; /* like old IE */
(default is content-box)
- Example: