/ Published in: CSS
This would work well in any browser if we leave in a perfect world :P I am pretty sure it doesn't work on IE6, but it might work on any other web browser following the CSS2.1 standards.
Expand |
Embed | Plain Text
p:first-child:first-letter{float:left;font-size:1.6em;padding:5px;background:#000;color:#fff;margin-right:4px;font-weight:bold;} p:first-child:first-line{font-variant:small-caps;}
Comments
Subscribe to comments
You need to login to post a comment.

Does anyone know if this works in IE 6 or IE 7?
I tested it in IE7, and the first letter is centered vertically with the first line; so it doesn't work exactly. You can change it with line-height though (line-height:25px;), it corrects the positioning (in Opera 9 as well) and doesn't effect FF.
[Here is another example of Drop Caps that I use.] (http://www.mandarindesign.com/dropcaps.html)
Won't work in IE6 since it doesn't support those pseudo-classes. Should work in IE7.