Difference between revisions of "Cascade weight (CSS)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Created page with "In Cascading Style Sheets, '''cascade weight''' refers to the numeric value of a CSS rule. Cascade weight is a measure of how important a rule is, among all rules which a...")
 
(See also)
Line 20: Line 20:
  
 
== See also ==
 
== See also ==
 +
 
* [[Cascade (CSS)]]
 
* [[Cascade (CSS)]]
 
* [[Cascading Style Sheets]]
 
* [[Cascading Style Sheets]]
 +
 +
== External style sheets ==
 +
 +
* http://code.karljones.com/docs/css/CSS-part-02.pdf

Revision as of 17:04, 8 March 2016

In Cascading Style Sheets, cascade weight refers to the numeric value of a CSS rule.

Cascade weight is a measure of how important a rule is, among all rules which affect a give web page.

CSS Cascade

The Cascade (CSS) refers to the way that CSS deals with multiple style rules, when the rules apply to a single specific HTML element.

When rules do not conflict, they combine. Both rules apply, when they do not conflict with each other.

When rules conflict, the rule with the highest cascade weight wins

When two or more rules conflict, the rule with the highest Cascade weight (CSS) applies. The other rules are ignored.

Web designer advice

It is not necessary to calculate, or know, the numeric value of the weight (although you can look it up using Inspect Element), if you are curious).

More important, you should know the general principles of the cascade. You will be able to judge the weight intuitively, with practice.

See also

External style sheets