On Wed, 21 Feb 2007, Ingo Chao wrote:

> No good idea. Maybe:
>
> p { margin: 0; text-indent: 0; }
>
> p:first-letter { padding-left: 1em; }

I'd love to see your good ideas if you don't count this as good!

Looks like a perfect solution to me. Removes the problem both on IE 6 and 
IE 7, and setting left padding for the first letter instead of text-indent
isn't even a hack, just an alternative (and perhaps more natural) way of 
doing things.

In theory, the :first-letter pseudo-element is defined as referring to the 
first _letter_, so one might be worried about the situation where a 
paragraph starts with a non-letter character like a digit or parenthesis. 
However, the CSS 2.1 draft (i.e., the thing closest to a de facto standard 
we have) says: "The ':first-letter' also applies if the first letter is in 
fact a digit, e.g., the "6" in "67 million dollars is a lot of money."" 
And it probably _wants_ to say that the pseudo-element denotes the first 
non-whitespace _character_, and this is how browsers take it.

> IE6 needs the blank before the left curly bracket after the :first-x
> selector.

Oh. Yes, so it seems. Thanks for this warning, too!

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to