You are here: Re: can you :first-line pseudo-element a class? « HTML « IT news, forums, messages
Re: can you :first-line pseudo-element a class?

Posted by Troy Piggins on 10/29/98 11:40

* Mark Parnell wrote:
> Deciding to do something for the good of humanity, Troy Piggins
><usenet-0602@piggo.com> declared in alt.html:
>
>> div.note:first-line {
>> padding-left: 30px;
>> }
>>
>> But it seems to have no effect.
>
> That's because padding doesn't apply to :first-line.
>
> "Only the following properties apply to a :first-line pseudo-element:
> font properties, color properties, background properties,
> ?word-spacing?, ?letter-spacing?, ?text-decoration?, ?vertical-align?,
> ?text-transform?, ?line-height?, ?text-shadow?, and ?clear?."
> http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo
>
> It does go on to say that UAs may apply other properties as well, but
> that will be different in each browser.

D'oh - sorry about that. Thanks.

Changed to this and it works:

..note:first-letter {
padding-left: 30px;
}

Interestingly this appears (renders?) the same in Firefox:

div.note:first-letter {
padding-left: 30px;
}

but in IE the first letter seems to inherit .note's padding, margin,
border properties etc.

--
Troy Piggins
Ubuntu 5.10 pkgs : kernel 2.6.12-9-386, postfix 2.2.4, procmail 3.22
Compiled from src : slrn 0.9.8.1/rt (score_color patch), mutt 1.5.11i
vim 6.4

 

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

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