Blog: jQuery

Elevated initial caps with jQuery

July 2, 2008 at 2:46pm.

0 comments.

For a project I am currently working on I wanted to use elevated initial capitals to set off each block of text. The obvious way to do this would have been with the :first-letter pseudo-element, which is what I initially did. This worked great in Safari, but in Internet Explorer, I got a series of bugs and idiosyncrasies that eventually became more trouble than they were worth. Line spacing was alternately too loose or too tight, depending on what I did, and in IE6 it interacted with the IE7-js script to make all but the first paragraph tiny.