CSS video tutorial – 10 – CSS Cascade Vs CSS Inheritance

Cascade vs. Inheritance Cascade: deals with precedence of style rules or CSS properties (i.e. the order in which properties are applied to an html element). It solves conflict situations. Let me ask you a question: What happens when we define set of style rules for a specific tag in external, internal as well as inline styles? The answer is: “rules get’s cascade” When we define a set of style rules for a specific tag in external, internal as well as inline style, then browser creates a virtual declaration list by merging all style rules together by following rules of cascade, and then applies the merged virtual declaration list to specified tag. The rules of the cascade include: 1. Later properties (nearest) override earlier (farthest) properties 2. More specific sele

It's only fair to share...Tweet about this on TwitterShare on FacebookShare on TumblrShare on Google+Digg thisShare on LinkedInPin on PinterestShare on VKShare on RedditPrint this pageEmail this to someone
Flattr the authorShare on StumbleUponShare on YummlyBuffer this page

Leave a Reply

Your email address will not be published. Required fields are marked *