Thierry Koblentz wrote:

http://datagnostics.com/test/vertical.html

I've got superscript text that needs to be all over the page -- it's
part of the company name.

At this point I'd raise the question whether the superscript text could be written using superscript characters such as "²". If it is, then using such characters might be better than any CSS approach, partly because they have been designed by a typographer to fit the font design, as opposite to fairly mechanical and partly questionable transformations (font size change, vertical placement).

I set a line-height in BODY. I'm doing the
superscript via a span class, with attribute vertical-align: super.

This puzzles me... why not <sup>? Doesn't the author want the text to appear in superscript notation when CSS is off? And <sup> is shorter and more readable.

In IE, the superscript mucks up the borders and margins -- it's as
though the element block goes up and never comes back down when I
close the superscript.

This might be limited to older versions of IE only. On IE 8 in "standards" mode, the problem doesn't appear to be there. But it's probably still an important problem.

You need to help IE by giving the parent a layout.
Try h3 {zoom:1;}

That's one approach, but another one is to refrain from setting vertical alignment (or set it explicitly to zero when using <sup> markup) and set

position: relative;
bottom: 0.7ex;

for the superscript element. Naturally you would tune the value 0.7ex according to font characteristics etc. And you might see the superscript go outside box boundaries or even touch the text line above - so you would need to take care of height and line-height issues.

Still, this would be my preferred approach, and it would also address the problem that different browsers interpret vertical-align: super rather different and may have bugs with some types of values for vertical-align.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to