user3108268 user3108268 - 1 month ago 20
CSS Question

The :first-letter reads <img> tag

My paragraph

<p>
starts with some
<img>
in it, so
p:first-letter
doesn't apply to the text that comes after
<img>


It does work if I remove the
<img>
.

https://jsfiddle.net/zg93usfn/

Answer

This is not possible

See w3.org

The ::first-letter pseudo-element represents the first letter of an element, if it is not preceded by any other content (such as images or inline tables) on its line.