Matthew Knott

Previous: Advanced Canvas Based Pie Chart
Next: Comments system added

Descendant Selectors Explained

Posted on Thursday, 03 April 2008 23:53

Web development is rife with fantastic words and phrases. I just read one of them in an article in .net magazine, Descendant Selectors

This term simply refers to styles applied to an element or class based on the parent element or class.

h1 { color: red; }

.header h1 { color: blue; }

The code above would render H1 tags in red, except when they occur within an object with the .header class.

For further details check out the w3c guidelines on types or CSS selectors here.

Comments

No comments have been added.

Add a comment