On Sun, 13 May 2007, [EMAIL PROTECTED] wrote:
> Is there a way to replace the P:first-letter pseudo-element with an
> image?
I'm afraid not. If you use a background image, what happens when your
style sheet is applied but image loading is disabled or the image will not
be used for some other reason?
> DIV#square > DIV > P:first-letter { background-image: url(capA.gif);
> background-repeat: no-repeat;
> width: 600px;
> color: #FFFFFF;
> letter-spacing: 60px;
> line-height: 62px;
> padding-left: 2px;
> float: left;
> font-size: 1px;
> height: 62px; }
I don't see why you set the width to such a large value, but anyway, by
CSS specifications, only a certain set of properties have an effect on a
:first-letter pseudo-element, and width and height are not among them.
Besides, you would need to write a separate CSS-rule for each initial
letter, so it would not be essentially less awkward than the old HTML way
<p><img alt="A" src="capA.gif">n interesting story...</p>
--
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/