Hi,
I know that my question doesnt aim 100% at this group, but at least here are 
people that care for cross browser behaviour.

Is there a guaranteed behaviour for elements having multiple classes?

<div class="red blue">hello world</div>

when
div.red { background-color:red;}
div.blue {background-color:blue;}

it will be blue.

<div class="blue red">hello world</div>

will also be blue. So order in className will not matter.

when I switch the lines in the css:
div.blue {background-color:blue;}
div.red { background-color:red;}

it will be red in both cases.
So is the order of the css definitions always relevant for the style of the 
elements?

I noticed that adding or removing class name on runtime doesn't change this 
behaviour. Even when the first css class is added later on the div will look 
always like the second defined css class

So despite this being a bit odd to me (not the css definition but the element 
definition should infulence that imho), I wonder if all browsers behave the 
same here.

Thanks
Fabian

_______________________________________________________________________
Viren-Scan für Ihren PC! Jetzt für jeden. Sofort, online und kostenlos.
Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to