Previous Message
Next Message

dual classes in same element

Sent by Marty Martin on 29 October 2004 20:08


I have two classes, one is called .leftsidebar the other is called .clear.

..leftsidebar {
    background-image: url(blah.gif);
    background-color: #CCC;
}

..clear {
    background-image: none
    background-color: transparent;
}

Now, I am using some dynamic scripting that allows a user to determine 
if the sidebar should be the default --

<div class="leftsidebar">

or if it should be blank, wherein the scripting would automatically 
insert .clear as below--

<div class="leftsidebar clear">

Now, the leftsidebar style has widths and other things applied to it 
that I want to carry over to .clear, but I want .clear to override the 
background settings.  I know I could just create a whole new style, but 
I don't want to do that, I want it to work like this as I think it's 
supposed to. 

The above example does work fine in Mozilla, but not in IE.  In Mozilla, 
the background values are cleared and it displays correctly, in IE 
nothing changes at all, even though I can look at the source and see 
that the style value of "clear" has been added as I stated above.

Is this a known IE bug rendering styles or am I doing something wrong?

Thanks!

-- 
Marty Martin
ICN.NET (Icons, Inc.)
Internet Development | Marketing | Support
[EMAIL-REMOVED] 

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: