Sent by Michael Collins on 8 February 2003 14:02
I am having difficulty using multiple values within one CSS class
attribute using a GUI Editor, specifically GoLive 6 or Dreamweaver 6.
If I select a section of text, apply one of my classes from the CSS
palette, then pick a second class, the first one gets unselected.
Only one can be selected. Additionally, if I apply styles manually by
entering the classes in the GUI mode (or text editor), the editor
does not recognize their use and does not render both of the classes.
Why does Adobe or Macromedia not recognize that this is a serious
lack of functionality? Isn't it fairly common practice? I personally
find it a very good way to organize classes because one does not need
to create a multitude of classes that are each slightly different
from some other class.
MORE DETAILS
Here is an example:
<p class="contentcolor thick size09">My Text</p>
In this example, "contentcolor", "thick", and "size09" are three
separately defined classes. In CSS2 it is legal to specify more than
one class within an attribute as long as each one is separated by a
space, see:
http://www.webreview.com/style/2000/08_18_00.shtml
In my experience this works on both Mac and Windows IE and Netscape
(the more recent of both that support CSS 2 and even earlier) so I
have not had issues using this practice. For compatibility, see 5.8.3
at:
http://www.webreview.com/style/css2/charts/selectors.shtml
I code all web pages using a combination of classes, one class
typically sets a color and the second a size. This eliminates the
need for a multitude of classes for each possible combination. For
example, if I have:
.title { ... etc ... }
.alert { ... etc ... }
.message { ... etc ... }
.size12 { ... etc ... }
.size10 { ... etc ... }
.size09 { ... etc ... }
.size08 { ... etc ... }
I can use combinations to size title, alert, and message without
having to specify all the combinations of the two:
.titlesize12 { ... etc ... }
.alertsize12 { ... etc ... }
.messagesize12 { ... etc ... }
.titlesize10 { ... etc ... }
.alertsize10 { ... etc ... }
.messagesize10 { ... etc ... }
.titlesize09 { ... etc ... }
.alertsize09 { ... etc ... }
.messagesize09 { ... etc ... }
.titlesize08 { ... etc ... }
.alertsize08 { ... etc ... }
.messagesize08 { ... etc ... }
--
Michael
__
||| Michael Collins
||| Kuwago Inc [EMAIL-REMOVED]
||| Seattle, WA, USA http://michaelcollins.net