[thelist] Tip: Consistent <sup> tags cross-browser

Stephen Rider evolt_org at striderweb.com
Fri Sep 22 14:17:38 CDT 2006

It's Free Tip Friday!  :)

<tip type="Making SUP tags consistent cross-browser" author="Stephen  
Are superscripts screwing up your line spacing in some  
*cough*IE*cough* browsers?

Try dropping this in your default stylesheet:

	sup {
		position: relative;
		top: -3px;
		vertical-align: top;
		font-size: 90%; /* You can change this value, but DO specify a %  
size */

I've tested this in IE 6 (Win), Safari (Mac), Firefox (Mac and Win),  
and Opera (Mac).  It corrects line heights getting pushed around, and  
normalizes the size of the superscripted text.

Caveat:  This does NOT fix line spacing in IE 5 Mac.  If someone  
figures that one out, please let me know!

Have a nice weekend,

Stephen Rider

More information about the thelist mailing list