OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Inline style vs. style sheet
This page's ID:
27240
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
Hopefully this will help clarify (rather than adding more confusion ;) ) - You wouldn't generally nest CSS selectors with ID's - #thisid #thatid #theotherid { ... } Each ID can only appear once on each page, so the style attributes you give it won't usually need to be specified in regard to its parent element. However, there may be cases in dynamically generated pages, where something of the same ID will appear within different elements depending on which page it is loaded in, and for some reason may require different styling. The main reason you use such nesting would appear more like this - #nav ul li { ... } in which you would specify a different style for list items when they appear inside the #nav element. This is generally preferable (IMO) to setting a class for the li, as it retains more flexibility and interferes less with your mark-up. So you are more or less correct, Karl, but it's all in how you set it up. The idea is to keep your mark-up as clear as possible, which means using less class names on child elements - using the class or id of the parent element to define the styles of the elements within them. [url=http://in-dented.com/sigs.html][img]http://in-dented.com/sigs/knot_sig_32.gif[/img][/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »