I have the following HTML:
<p style="font-family:Verdana">test<sup>2</sup></p>
<p style="font-family:Verdana;vertical-align:top">test<sup>2</sup></p>
The problem is that in the second
the <sup>
is no longer positioned above the text but a few pixels lower. In essence the vertical-align:top
raises all text except the superscripted to the top:
This doesn't happen in Firefox, Opera but in Chrome and Safari (all Windows) and not with some fonts (like Times New Roman).
Do you think this is a problem with the font or actually a bug in Webkit? There is already a bug reported and I attached my test case but I don't know how quickly it'll be solved since that bug has been reported over three years ago...
Do you have an idea for a workaround? If possible with only CSS changes.
UPDATE
I tried the suggested solutions and most of them display the same as using a sup
tag.
I created a fiddle to show the different implementations.
The Chrome bug report: http://code.google.com/p/chromium/issues/detail?id=23634