[WEB4LIB] Re: Combining classes with CSS
Thomas Dowling
tdowling at ohiolink.edu
Thu Mar 14 11:28:45 EST 2002
At 10:07 AM 3/14/2002, Kevin W. Bishop wrote:
>I don't know if it's "legal" to combine classes in a single element, but why?
It makes more sense when you have class names that describe the purpose of
an element, and consider elements with multiple purposes. The example
given doesn't really suggest why a paragraph would be in the emphasis1 or
marginmedium class. But consider a script that displays, say, your
subscribed electronic journals with holding statements, access info,
etc. Make it searchable by keyword, and decide that you'd like to
highlight the field the user searched in--title, publisher, whatever. In
this context, it might be clearer why you'd want:
<p class="search-string">You searched for journal titles with the
word "Communications"</p>
<p class="journal-title search-hit">Online Communications in Hit
Highlighting</p>...
In other contexts, you might have table cells that have separate class
relationships to their row and to their column, perhaps like: <th
class="section-end subtotal">. Or citations to articles where the main
author is also a local faculty member: <span class="main-auth
ego-stroke">. And so on.
Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu
/* That's... */
.ego-stroke {
font-size: 250%;
font-weight: bold;
text-decoration: blink;
}
More information about the Web4lib
mailing list