OZONE Asylum
Forums
CSS - DOM - XHTML - XML - XSL - XSLT
CSS...sharing IDs..??
This page's ID:
31106
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
No. The CSS would have no way to know that you want to relate it to the #content styles. The easiest way to do this would be to add a class to the div (in addition to the id), and define your new background color in the styles for that class. Just make sure the background color for the class is defined AFTER the styles for the id in your css. {{edit - Ok, it looks like you were editing while I was posting! I may have misunderstood your intent a little this: "#content content2{}" tells the browser to style an element of the type 'content2' (which doesn't exist as an element type) that is inside an element with an ID of "content". What you need is [code] #content, #content2 { ...shared styles.... } [/code] if you want an element with either ID to share the styles. and then you will need [code] #content a, #content2 a { ...shared styles.... } [/code] and so on... You can do this with any number of selectors...you can specify any number of elements, id's, and classes that will share a set of styles, simply by separating them with commas. if you separate with a space, you are specifying that the second item is a child of the first. You could mix it up completely [code] #content, div p span strong a, .thisclass, li.thatclass, .thisclass .thatclass, #thisid .thisclass (etc etc etc){ ...shared styles.... } [/code] and so on... [small](Edited by [url=http://www.ozoneasylum.com/user/163]DL-44[/url] on 07-06-2009 23:50)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »