Re: Solution - how to superscript without affecting line spacing

by "rudy" <rudy937(at)rogers.com>

 Date:  Mon, 3 Mar 2003 14:18:24 -0500
 To:  <hwg-techniques(at)hwg.org>
 References:  0
  todo: View Thread, Original
> The HTML way to superscript is to do something like 2<sup>nd</sup>, 
> which pushes the superscript up so high that the line spacing typically 
> expands to make room for it.  

the way i used to do it is like this --

       E = mc<small><sup>2</sup></small>

sup by itself just raises the text

small makes it smaller, often a typographically desired
characteristic of a superscript

small around sup is really neat in that it does not result 
in a change to line spacing (sup around small does)

this technique should only be used for backwards compatibility in 
non-css browsers

if only css browsers matter, then i too would code

       E = mc<sup>2</sup>

and do my styling in css


thanks, chuck


rudy

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA