Philippe Wittenbergh wrote:

On Sep 26, 2010, at 7:13 AM, Philip Taylor (Webmaster, Ret'd) wrote:

vertical-align: baseline;
position: relative;
bottom: <some factor>ex;

I've used that for quite a while and it works fine across the board.

It seems that it wasn't completely new to me either... I had even written, in 2008, a short page "How to prevent uneven linespacing when subscripts or superscripts are used on web pages",
http://www.cs.tut.fi/~jkorpela/www/linespacing.html
that describes such a technique - I just didn't start using it for some odd reason. :-(

One nitpick: I'd use 'em' instead of 'ex'.

Some browsers have poor support for 'ex' (treating 1ex= 0.5em,
whatever the font in use, no questions asked)  - IE running on XP,
Opera.

That's what I though IE keeps using, but a quick test shows that you are right about IE 8 on Vista for example. So things are getting better.

This leads to completely unpredictable results.

Completely unpredictable? Really? My expectations are that ex is either the true x-height of the font, or the value 0.5em (which might be characterized as "rough average" of ex across fonts), or something near these values. In the long run, as browsers improve, ex for subscript or superscript placement can be expected to work better. Meanwhile, I'm willing to accept some variation.

After all, if the placement details really matter, then they also depend on the font and on the characters involved.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
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