cssreset-context.mustache revision 2b2e4f70eae9afd1fa8c2a1708495335b71515cd
<div class="intro">
<p>CSS Reset can be used contextually by appyling CSS Reset to specific regions of the page.</p>
</div>
<div class="example newwindow">
<a href="cssreset-context-example.html" target="_blank" class="button">
View Example in New Window
</a>
</div>
<h2>Contextual Usage</h2>
<p>When CSS Reset is included in a page it applies rules to all HTML elements via type selectors like this: <code>h1 {margin:0;}</code>. The contextual version uses only descendent selectors like this: <code>.yui3-cssreset h1 {margin:0;}</code>. This means you can put that class value on a node in your document to choose which region(s) of your page CSS Reset will be applied to.</p>
```
<div class="yui3-cssreset">
<p>Everything within this container will have CSS Reset applied.</p>
</div>
```
<h3>Note:</h3>
<p>Because CSS examples are susceptible to other CSS on the page, this example is only available in a new window at the above link.</p>