OZONE Asylum
Forums
CSS - DOM - XHTML - XML - XSL - XSLT
Selector Div Img and Class
This page's ID:
27703
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
Hi Karl, sounds like you're trying ot get to grips with how CSS defines properties and handles selectors, it can be confusing to start with but once you've got it you'll be flying. I really recommend taking a look at what the [url=http://www.w3.org/TR/REC-CSS2/selector.html]W3C has to say on their website[/url]. Crazy I know but the small table at the beginning of the page really breaks things down and explains about using selectors properly. You don't have to understand it completely, but just bear it in mind and think about it when you write what you already know, a really nice tutorial can be found at the good ol' [url=http://css.maxdesign.com.au/selectutorial/]CSS MaxDesign website[/url]. This nicely breaks down how to approach selection. Now onto what you've suggested in your last comment. If the following is your HTML...[code]<div id="SOME_ID" class="some_class"/>[/code]Then you could select it using any of the following...[code]#SOME_ID{/*Properties*/} #SOME_ID.some_class{/*Properties*/} .some_class{/*Properties*/}[/code]Notice that there us no space in the second example between the ID and class selectors, with the space it would mean select an element with class=some_class inside the element with id=#SOME_ID Use div tags with image backgrounds, only when it's necessary to have a background image, if images are part of your content then leave them in your XHTML. With regards to semantic naming conventions, let me try and explain with the following examples, these are correct names...[code]#navigation{/*properties*/} #warningText{/*properties*/} #disabledLink{/*properties*/}[/code]And these are wrong...[code]#leftDiv{/*properties*/} #redText{/*properties*/} #greyText{/*properties*/}[/code]Don't use class or id names that are specific to what they do in the current design, because things may change and then your class names and ID's won't make sense anymore. Cheers, [img]http://www.geocities.com/blaise69dude/images/BlaiseSig.gif[/img]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »