Skip navigation
Currently Being Moderated

mm

Dec 31, 2012 11:19 AM

If this (²) is how you make a "2" small and rrze above a "m" m2, how do you make a  "mm" rize above a number

 
Replies
  • Currently Being Moderated
    Dec 31, 2012 11:40 AM   in reply to Jeffrey54 Lane

    The code you reference is a specific short code html entity, there isn't a version of that for everything. What you're looking for is called "superscript".

     

    The good part is you really don't need to use short codes for everything superscripted. The best way to do superscript is to combine the <sup> html tag with  css...

     

    In your css, add this...

     

    sup {

      position: relative;

      top: -1ex;

      vertical-align:baseline;

      font-size: 80%;

    }

     

    In your html, any text you want to be superscript, add <sup></sup> tags around it, like this...

     

    <p>Here is some pure text awesomeness<sup>10</sup> (text awesomeness to the power of 10)</p>

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 31, 2012 12:07 PM   in reply to Jon Fritz II

    Strictly speaking, you can use the <sub> or <sup> tags without any CSS, but in some browsers (guess which ones), it messes up the line-height.  Jon's addition of a vertical-align property helps keep this in check.

     

    For details, see link below:

    http://paularmstrongdesigns.com/weblog/stop-superscripts-from-breaking -line-heights-once-and-for-all/

     

     

    Nancy O.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points