[thelist] Overriding a CSS class with another CSS class

Ken Schaefer ken at adOpenStatic.com
Wed Sep 10 00:54:40 CDT 2003


At what point in time are you aware of the *names* of the classes defined in
the external style-sheet? Are these going to be fixed at some point in time?

Whilst you certainly can set a style (eg using CssClass="" for example in
your .Net code), unless you happen to know the names of the classes in the
external style sheet, you're going to have a problem aren't you? ie, what
"class" to apply at run-time.

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Tim Kuhn, Marla Adams" <timmarla1 at comcast.net>
Subject: [thelist] Overriding a CSS class with another CSS class


: 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