From: Chris Beall
Reply-To: Chris_Beall@prodigy.net
Newsgroups: alt.html
Subject: Re: Question about CSS selectors
References: <1129413693.174360.7660@g44g2000cwa.googlegroups.com>
In-Reply-To: <1129413693.174360.7660@g44g2000cwa.googlegroups.com>
Date: Sat, 15 Oct 2005 23:16:17 GMT
Jeanne D wrote:
> This is probably really obvious, but I can't find what I'm looking to
> do in my DHTML and CSS manual.
>
> I want to have two different selectors specified on one line of type.
>
> The Great Escape .... by JD
>
> I wanted the The Great Escape to be in one font and ... by JD in
> another. How do I do that? Thanks much.
>
Jeanne,
Hmmm. This looks like a citation, so you could use something like:
The Great Escape .... by JD
Then, in the CSS:
cite {
font-family: whatever1 ;
}
author {
font-family: whatever2 ;
}
That would apply whatever2 to ANY element of class author. If that's
too general, you could instead say:
cite span.author {
font-family: whatever2 ;
}
Which means "apply this style to any of class author that is the
descendant of (i.e. contained inside) a ".
The exciting details of CSS selectors can be found at
http://www.w3.org/TR/CSS21/selector.html. I recommend ingestion of a
stimulant before reading.
Chris Beall