Ron Koster wrote:
> Just to change the subject...

Ok, but we're still in the same thread :-)

> - footnotes; - for numbers like "1st", "2nd", "3rd" (where the latter
>  half, er, two-thirds is superscripted); - certain words like "Ye", 
> "Dr", etc.
> 
> If I put those parts in superscript -- and if a person has a minimum 
> font size (which, of course, is smaller than the typically quite 
> small size of superscripted characters) -- then things start going 
> haywire. Not only do the superscripted look ridiculous (because 
> they're so big), but it also *forces* the line height up for that 
> particular line, regardless of what I've specified as my line height 
> to be (in %).

Unit-less line-height values works best in most cases. Have you grasped
the difference?

- a 'line-height: 140%' means the line-height is calculated from
font-size of the actual element's parent - not the element itself.
You'll have to keep track of what the parent-element's font-size is to
know what your real line-height ends up as. Same for a 'line-height:
1.4em'.

- a 'line-height: 140%' means the line-height is calculated from
font-size of the actual element itself, regardless of font-sizes in its
surroundings. Nothing to keep track of.

> Is there anything that can be done about this -- without just 
> throwing out superscript as an option entirely?

You can minimize the "problem" but not eliminate it.

The effect superscript can have on actual line height when subjected to
'minimum font size', can be counteracted by vertical-aligning the
superscript, or subscript, at the baseline, and then offset it by
relative positioning. Since relative positioning does not affect the
actual space, only the visual, the line-height won't be affected. Make
sure the sup's line-height is smaller than that on the paragraph, so it
doesn't blow up the line in its original, non-positioned, space.

I use a different method - styles shown here...

sup {vertical-align: 0.4em; line-height: 0; font-size: 100%;
font-family: "Times New roman", Georgia, serif;}
sup.small {font-size: 75%; font-weight: 200;}

...where the line-height is zero on the sup and therefore has little to
no effect on a paragraph's line-height even if the font size gets blown
up for sub.small (which is the real superscript).

Note that I'm also using a first-choice for font-family - Times New
roman - that is visually smaller than the one I use for regular text in
the paragraph - Georgia. This helps make the sup appear smaller in most
cases, even if everything is blown up to above the paragraph's own
font-size.

Haven't encountered any serious blown-up lines or misalignments with
this method so far.


Typography on the web is full of "tricks" and compromises like the
above, and with a little fine-tuning, and testing of what actually works
and looks "ok", the results are not too bad even under stress.

In time we may be able to upload fonts and do other things to improve
the illusions, but existing browsers will still need solutions that work
- somewhat - for years to come.

regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
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