I’d like to achieve this:
Changing the font size of the first letter is easy by using CSS ::first-letter Selector.
But how can I align it with the 2 or 3 lines in front of it?
Is this possible with only CSS?
If now, would appreciate any hints on how to achieve this using JS.
>Solution :
what’s your html markup like?
if it’s just a simple
tag, this might help you
The html
p:first-child:first-letter {
float: left;
font-size: 75px;
line-height: 60px;
padding-top: 4px;
padding-right: 8px;
padding-left: 3px;
}
<p> a sentence for your site </p>
