demosthenes.info

Iā€™m Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with , and . To receive more information, including news, updates, and tips, you should follow me on Twitter or add me on Google+.

web developer guide

my books

Book cover of Pro CSS3 AnimationPro CSS3 Animation, Apress, 2013

my projects

CSSslidy: an auto-generated #RWD image slider. 3.8K of JS, no JQuery. Drop in images, add a line of CSS. Done.

tipster.ioAutomatically provides local tipping customs and percentages for services anywhere.

Style rule prioritization

css / introduction

Estimated reading time: 33 seconds

Style rules take increasing priority as they grow closer to the element they are influencing: that is, in the case of a rule conflict, the rules for an inline style will trump those of an embedded style, and embedded style rules will be used over a linked style rule.

Style rules are synergistic if they do not conflict: a rule written in a linked style sheet will join with embedded and inline rules for the same element to create an appearance that is the result of combining the rules.

All other things being equal, a conflicting rule between an id and a class will resolve by favouring the rule in the id.

comments powered by Disqus

This site helps millions of visitors while remaining ad-free. For less than the price of a cup of coffee, you can help pay for bandwidth and server costs while encouraging further articles.