Drop caps are usually used in desktop publishing, the first letter of a paragraph is enlarged to drop down 2 or more lines. Update: To make it work in IE6, the first letter needs to be wrapped in a span. IE6 Example
Markup
<p class="drop"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </p>
CSS
.drop:first-letter { font-size: 4.2em; float: left; line-height: 0.6em; margin: 0.13em 0.13em 0.13em 0; }
Example
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Browser Support
- Firefox
- Safari
- Chrome
- Opera
- Internet Explore 7
Comments
leave a commentNice. I might use that in a theme.
It’s not working in IE6 and earlier
Unfortunately IE6 needs extra markup for it to work. The first letter needs to be wrapped in a span with class of “drop” here is an example
Thanks, great tutorial. – Bri
great tutorial, easy to do and usable
thanks
yes very nice trick thanks man