If you want to use the :first-letter
pseudo-element to create drop caps, there are a few things to keep in mind. Let's see the details.
Here's the code:
p:first-letter { font-size: 4em; font-family: Georgia, serif; color: #888; float: left; margin: 0 10px 0 0; line-height: 0.8; text-shadow: 1px 1px 1px #333; }
Two things to notice here:
line-height
is set to0.8
so that the drop cap is vertically aligned with the first line of the paragraph.- The bottom margin is zeroed so that the surrounding text properly wraps the drop cap.