You are here: Re: Question about CSS selectors « HTML « IT news, forums, messages
Re: Question about CSS selectors

Posted by Chris Beall on 11/18/77 11:29

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:

<cite>The Great Escape <span class="author">.... by JD</span></cite>

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 <span> of class author that is the
descendant of (i.e. contained inside) a <cite>".

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация