You are here: Re: is this css legal ? « HTML « IT news, forums, messages
Re: is this css legal ?

Posted by Harlan Messinger on 10/06/06 19:05

Eric B. Bednarz wrote:
> NoWhereMan <nowhereman@PLEASEDONTSPAMMEdespammed.com> writes:
>
>> are these css selectors legal ?
>>
>> .storycontent > p:first-child:first-letter{
>
>> .storycontent > p:first-child:first-line{
>
>> looks like syntactically valid (the w3c validator says it is) but is it
>> legal ?
>
> It looks suspicious

Why? Because it's redundant?

> but formally correct.
>
>> firefox interprets this as I suppose it should; opera does not :(
>
> The odds are that Opera does the right thing; you did not show the
> markup, and probably not the complete style sheet.
>
> So what's the value of P's first child's display property (hint)?
>

As with any of the pseudo-elements, it's pseudo. There isn't an element
there that has properties of its own, display or otherwise. Only if a
element specifier, to which a pseudo-element specifier is attached in a
selector, matches an element in the document does the UA act *as if*
there were an element possessing (only) the style properties that are
set. This is what happens in the case of

div.story:first-letter {
float: left;
font-size: 3em;
font-weight: bold;
}

At that point, the UA equally well act *as if* that pseudo-element has
pseudo-elements of its own, if a reference that could be interpreted
that way appear in a selector.

 

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

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