OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
class VS id what is the difference
This page's ID:
10895
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
So far so good this is all clicking together nicely. I have a question about this: " Thirdly; "I believe that if you have conflicting style specifications, the value in the *last* listed class is predominant." Actually, the order of the classes in the HTML doesn't make a difference. It's the order of the style sheet that matters. So whichever color you specify last for either of the two classes will be the one taken on by elements that are members of both classes. " So the intepretation of the following is different: <div class="id8877 shoppingCartItem"></div> <div class="shoppingCartItem id8877"></div> Thus if both change the same property the last option allways wins? Now if in the page in the following order I say: 1. item8877 {color:blue;} 2. <div class="item8877">blue</div> 3. item8877 {color:red;} 4. <div class="item8877">red</div> The color written between the divs is what I would actually see. The entire document is not parse and only one style applied for the class item8877, instead the style is applied accoring to step 1 until step 3 happens and then every class item is displayed that way? Thanks, Jeff
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »