First letter pseudo class works perfect for p element but not for anchor(links). Why?
How to make the first-letter style different for <a>
element
a:first-letter
{
font-size:200%;
text-transform:uppercase;
color:#8A2BE2;
}
First letter pseudo class works perfect for p element but not for anchor(links). Why?
How to make the first-letter style different for <a>
element
a:first-letter
{
font-size:200%;
text-transform:uppercase;
color:#8A2BE2;
}
How about this http://jsfiddle.net/raynesax/8W7FF/8/
According to the W3 spec, the :first-letter
pseudo-element only work for a block element, which a
is not.
Oddly, *:first-letter
caused the first letter to transform, at Chrome 14 and Firefox 3.6.23. Fiddle: http://jsfiddle.net/8W7FF/3/
If JavaScript is an option it might be worth looking at: http://letteringjs.com (which should be fairly cross-browser compatible)