View Single Post
Old 09-16-2018, 05:47 PM   #8
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
@Justin:
You haven't fully described what you mean by "inline" superscripts or what your goal is in terms of usage. The style property to use normally to keep superscripts inline is vertical-align. Values of this is what you want probably.

Here are two rulesets I use all the time: the first SUP is for footnotes references and the like. The SUP with class "ordinal" is what I use for ordinal numbers (like 1st, 2nd, etc.)


Code:
sup {
   vertical-align: super;
   font-size: 0.8em;
   padding: 0 4px;
   font-weight: bold;
}
sup.ordinal {
   vertical-align: text-top;
   font-size: 0.8em;
   padding: 0;
   font-weight: normal;
}
vertical-align: text-top; forces the superscript text to stay below the normal top of a font height. It is a nice effect and probably what you want.

Last edited by Brett Merkey; 09-16-2018 at 06:02 PM.
Brett Merkey is offline   Reply With Quote