harbingerOTV
07-18-2008, 03:48 PM
I'm using jQuery to wrap the first letter of the first child paragraph in a span so I can absolutely position it. This works fine in Opera, Firefox and IE7. I know it won't in IE6. Safari applies the height, background and color. It even makes the span wide enough for the letter. What it doesn't do is apply the font size or weight.
I thought it was the script so I hard coded the effect and still the same effect (or lack thereof). I read around and couldn't find anything specifically showing this behavior.
Is this a known issue? Is there something I'm missing? Is there a solution to this?
div.text {
font: 12px/22px arial, sans-serif;
color: #333;
width: 550px;
margin: 0 auto;
position: relative;
}
div.text p:first-child:first-line {
color: #ed669c;
font: 14px arial, sans-serif;
}
div.text p:first-child span:first-child {
font: bold 100px/100px arial, sans-serif;
color: #ed669c;
position: absolute;
right: 554px;
top: -6px;
background: #eee;
display: block;
height: 100px;
}
and the resulting HTML looks like:
<div class="text">
<p><span>M</span>orbi convallis.
Test page:
http://tugbucket.net/tests/firstletterjq.html
I thought it was the script so I hard coded the effect and still the same effect (or lack thereof). I read around and couldn't find anything specifically showing this behavior.
Is this a known issue? Is there something I'm missing? Is there a solution to this?
div.text {
font: 12px/22px arial, sans-serif;
color: #333;
width: 550px;
margin: 0 auto;
position: relative;
}
div.text p:first-child:first-line {
color: #ed669c;
font: 14px arial, sans-serif;
}
div.text p:first-child span:first-child {
font: bold 100px/100px arial, sans-serif;
color: #ed669c;
position: absolute;
right: 554px;
top: -6px;
background: #eee;
display: block;
height: 100px;
}
and the resulting HTML looks like:
<div class="text">
<p><span>M</span>orbi convallis.
Test page:
http://tugbucket.net/tests/firstletterjq.html