Format superscript text in Divi

Nov 21, 2020 | Divi Tips | 7 comments

Add the following CSS code to the Divi theme options area or your child theme style.css file.
sub, sup {
  font-size: 75%;
  /* Zero out the line-height so that it doesn't
     interfere with the positioning that follows */
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sup {
  /* Move the superscripted text up */
  top: -1.25em;
}
sub {
  /* Move the subscripted text down, but only
     half as far down as the superscript moved up */
  bottom: -0.25em;
}

Need help with this?
Hire me for a consultation and I'll walk you thru the process.

7 Comments

  1. Hey, Thanks for this! Worked perfectly.

    Reply
    • Awesome! You’re welcome!

      Reply
  2. sub,
    sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    }
    sup {
    top: -0.5em;
    }
    sub {
    bottom: -0.25em;
    }

    Reply
    • Many thanks! Awesome. It solved my problem.

      Reply
  3. Hi sorry I’m new to all this CSS stuff, I’ve added this code to the DIVI Options but what else should I do please? Might you do a step by step guide please? lol I’d really appreciate before I lose the will to live…

    Reply
  4. Hi Mazz,
    There is nothing else to do, other than save the Divi options, unless you want to modify the CSS to suit your needs.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

5 star reviews
"WOW! Money WELL spent. Joseph was incredibly knowledgeable in helping me make some final tweeks to my Divi website. He was very caring and went above and beyond. Will 100% use him for any future Divi website needs."
Claire - CMMC

5 star reviews
"You really get what you pay for with Joe. He does more than simply build a website, he sets up websites for success. Functional, clean, professional designs and he keeps up/implements the latest plugins and technology. Thank you Joe. I will continue to refer you work."
Mark Winger

5 star reviews
"The best WordPress guy I’ve worked with on WordPress, hands-down (and I’ve worked with dozens). Remarkably good with theme customizations with a quick turn. Kept it on budget as well. A rarity with hourly contracts."
Nate Wright

5 star reviews
"Thanks for your prompt reply. You’re always so comprehensive. If we could write another review just for your communication skills, then we would."
Alex N

More Tips

Looking for some deals?

Ad - Web Hosting from SiteGround - Crafted for easy site management. Click to learn more.

Cloudways Hosting

WPEngine Hosting

Pressable Hosting

AccuWeb Hosting

Divi PHP Code Module

Ask a Question

"*" indicates required fields