[thelist] Overriding a CSS class with another CSS class

Tim Kuhn, Marla Adams timmarla1 at comcast.net
Tue Sep 9 23:53:57 CDT 2003


Hello all,

I have an interesting challenge that I am having difficulty in solving. I am
writing a .NET user control that needs to be able to override an existing
CSS class with another CSS class that will come from an external style
sheet. The trick here is that I don't know and will never know anything
about the linked style class except it's name, a different department
controls what is in the external style sheet. I need to insert a "place
holder" style class, such as X, that will have a default style defined in
the linked style sheet, that I can override on the User Control's mother
page using either CSS, JavaScript or C# in the code behind. I can't seem to
find any DOM reference for an external style class such as
document.getElementById("foo").styleclass = "newStyleClass";, is there one?
Can I do this with CSS such as, .X # .X2? Is there any way to assign an
externally linked style to an object using C#? Any thoughts or input would
be appreciated.

Thank you,

Tim




More information about the thelist mailing list