Disable or reset a CSS rule
CssCss Problem Overview
If define a CSS rule with top: 0;
, how can I later disable or neutralise it in favor of bottom: 0;
used elsewhere?
Css Solutions
Solution 1 - Css
do top: auto; bottom:0;
- auto
is the default value for top
Solution 2 - Css
top: auto;
bottom: 0px;
Solution 3 - Css
if you have the stretch issue just use initial to reset the rule
top: initial;
or
bottom: initial;
Solution 4 - Css
CSS is cascading, so for example, if you put p { top: 0;)
first and p.bottom {top:auto; bottom: 0;)
after that, your css will listen to the latter for p.bottom