OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
CSS Subclassing (div tag)
This page's ID:
10743
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
The answer to your original question: Have a style sheet like this that has all the stuff specific to all divs with class "units": divs.units {...} Then have additional ones like this that carry the extra information for each type: div.backorder {...} div.instock {...} div.available {...} And then, in your html, just put divs like this: <div class="units backorder">...</div> <div class="units instock">...</div> <div class="units available">...</div> The class attribute is actually a space-separated list of all the classes you want to apply to an element. That thing you said in the post before mine will work perfectly fine; the first style sheet will apply to anything with myClass set, and the other two will apply only to their types of HTML element with myClass set. However, don't use HTML element names to differentiate between classes; only use the HTML element names where they're necessary. (for instance, only use a <table> tag when you have a table.)
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »