[thelist] Multiple CSS Classes

sasha sasha at bittersweet2.com
Fri Apr 26 18:30:01 CDT 2002


Having 2 classes applied to the same element like that
is technically incorrect syntax (if I'm not mistaken).

If you can't/don't want to have one class that does
both:

mystyle { font-weight: bold; text-decoration: underline
}

Your only option is to do this:

<span class="bold_class" style="text-decoration:
underline">whatever</span>

Unless of course, you don't mind using b/i or nesting
multiple span tags.

Christy "sasha" Siepker
http://www.bittersweet2.com

4/26/2002 7:17:52 PM, "David Bindel"
<dbindel at austin.rr.com> wrote:

>Does anyone know how to set an element to use multiple
CSS classes?
>
>The way I am doing it right now is separating the
classes by a space
>(<span class="bold underline">), but I have noticed
that the order in
>which you specify the classes in the class attribute
*can* have the
>effect of ignoring either class for unapparent reasons
in Internet
>Explorer.
>
>Example:
><style type="text/css">
>.bold {font-weight: 700;}
>.underline {text-decoration: underline;}
></style>
><span class="bold underline">This text should be bold
and
>underlined.</span>
>
>Is there a correct way of specifying multiple CSS
classes?
>
>Thanks in advance,
>David Bindel
>
>--
>For unsubscribe and other options, including
>the Tip Harvester and archive of thelist go to:
>http://lists.evolt.org Workers of the Web, evolt !
>






More information about the thelist mailing list