SitePoint
Reference
CSS
The Cascade, Specificity, and Inheritance
The Cascade
CSS Live Demo: The Cascade
(this page)
See also:
All Live Demos
CSS Live Demo: The Cascade
Type your
CSS
here:
(any properties allowed except expression, behavior and @import)
body { color:#000; background-color:#fff; } #wrap { font-size:2em; color:#333; } div { font-size:1em; } em { color:#666; } p.item { color:#fff; background-color:#ccc; border-style:dashed; } p { border:1px solid black; padding:0.5em; }
Type your
HTML
here:
(any tags allowed except script, iframe, frame, object, img and embed)
<div id="wrap"> <p class="item">This is the <em>cascade</em> in <a href="#">action</a></p> </div>
Show me!
Your results appear here: