Subscripts and Superscripts

In this chapter, you’ll learn how to use Custom CSS to make your subscripts and superscripts display properly within your book until they are corrected in the theme.

Subscripts and Superscripts

Currently subscripts and superscripts display like this:

SUBSCRIPTS

Notice that the m3 is not displaying as a superscript. By adding some Custom CSS, we can make it look like this:

CS

Adding Custom CSS

To add Custom CSS to your book, click Appearance and select Custom CSS on the left side menu (not in the themes).

custom css

It will provide you a field that looks like this:

CSS field

Where you will type in the following:

CSS

Here’s a version you can copy and paste:

small, sub, sup {font-size: .83em}
sub             {vertical-align: sub}
sup             {vertical-align: super}

Then click Update Custom CSS and your book’s subscripts and superscripts will work properly.

License

Icon for the Creative Commons Attribution 4.0 International License

Pressbooks 101 by L & S Learning Support Services is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.