Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable or reset a CSS rule

Tags:

css

If define a CSS rule with top: 0;, how can I later disable or neutralise it in favor of bottom: 0; used elsewhere?

like image 338
AlenDel Avatar asked Dec 09 '10 09:12

AlenDel


People also ask

What is CSS reset rule?

A CSS Reset style sheet is a list of rules that 'reset' all of the default browser styles. We reset the browser styles for two primary reasons: Not all browsers apply the same default rules. They may be similar, but not exact.

Should you reset your CSS?

In Support of No CSS Reset “If you take them away, you risk having content (say, user-generated content) that ends up being unstyled, raw.” Most designers and developers who believe that browser defaults cause most layout problems are wrong, according to Verschelde.

How do you unset a CSS style?

Use the revert keyword to reset a property to the value established by the user-agent stylesheet (or by user styles, if any exist). Use the revert-layer keyword to reset a property to the value established in a previous cascade layer.


2 Answers

do top: auto; bottom:0; - auto is the default value for top

like image 56
tenfour Avatar answered Sep 30 '22 02:09

tenfour


top: auto; bottom: 0px; 
like image 40
Jan Avatar answered Sep 30 '22 03:09

Jan