YUI 3.x Home -

YUI Library Examples: CSS Base: Contextual Example

CSS Base: Contextual Example

When CSS Base is included in a page it applies rules to all HTML elements via type selectors like this: h1 {margin-bottom:1em;}. An alternate version, -context.css, uses only descendent selectors like this: .cssbase-context h1 {margin-bottom:1em;}. This means you can put that class value on a node in your document to choose which region(s) of your page CSS Base will be applied to.

Note:

Because CSS examples are susceptible to other CSS on the page, this example is only available in a new window at the above link.

Copyright © 2009 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings