Style Sheets and Specific Applications

liunx

Guest
On one HTML page, quite often a CSS style sheet is applied (in the header), and the entire page follows those style rules as set in the CSS file. However, I am trying to have different styles set on the same page, where one element of the page would follow style A and the other style B.<br />
<br />
My question is, how can you make a CSS file apply to only a certain part of a page, and not affect the rest of the styles on that page? Thanks for any help!<!--content-->ill just do an example using td's<br />
<br />
td {<br />
background-color: 000000;<br />
color: #ffffff;<br />
}<br />
that stets all td's in your html to black with white text.<br />
<br />
<br />
td.StyleB {<br />
background-color: #ffffff;<br />
color: #000000;<br />
}<br />
now, any td with the code class="StyleB" will be white with black text<!--content-->
 
Back
Top