Thanks for the tips, Klaus!

On Sep 17, 2006, at 3:54 AM, Klaus Hartl wrote:
> Karl, for some nicer degradation you could use the first-letter
> pseudo-element selector:
>
> p:first-child:first-letter {
>      font: 2.5em/80% serif;
> }

Good idea. Of course, this will have no effect on IE. But I suppose  
IE users already have to suffer much worse than a plain first letter,  
so no big deal. ;-)

> And you should include an alt attribute in case users have images  
> disabled:
>
> $('<img />')
>      .src('/images/alphabet/' + text[0].toLowerCase() + '.gif')
>      .addClass('fancy-letter')
>      .attr('alt', text[0]);
>      .prependTo( firstP );

Absolutely! I had the alt attribute in there for my DOM scripting  
version, but forgot to include it during the translation to jQuery.

Both John's and Klaus's suggestions are now incorporated: http:// 
test.learningjquery.com/dropcap.htm

thanks again, guys!

Karl

___________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to