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
Note that your ID for the merchandise being sold does not correspond with an ID for an HTML element. As DL said, no two HTML elements can have the same ID. There are a few errors in DL's post that should be noted: <div class="8877" class="shoppingCartItem"> displays item in side bard shopping cart style</div> This is incorrect; the correct syntax is: <div class="8877 shoppingCartItem"> displays item in side bard shopping cart style</div> (Note that the multiple classes are separated by spaces.) Secondly, neither an ID nor a class may begin with a number. So 8877 is neither a valid ID nor a valid class name. Change it to something like "itemNumber8877" or something. 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.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »