In DIVI up to the actual version 2.5.6, the superscript and subscript is styled very odd by default:
This can be fixed with some simple CSS lines. In DIVI, it is solved with vertical-align: baseline; bottom: 0.8em
, while we could use vertical-align: super
. I also decreased the font-size, and the bottom needs to be neutralized, so here we go:
1 2 |
sup {font-size: 0.6em; vertical-align: super; bottom: 0} sub {font-size: 0.6em; vertical-align: sub; bottom: 0} |
The result looks much better and correct now:
Time has passed and you found it meanwhile working by default in the actual version of DIVI? Any other feedback? Please share your comment.
This was exactly what I was looking for, and works great!
Hi Sofian,
Thanks for your help with the super and subscript issue. I’m using Divi 4.0 and still have the same problem. I tried adding your css code to the Custom CSS/Main Element section of my Divi Slide Module but I get an ‘expected colon / unexpected token ‘}’ error….and nothing happens. I’m a novice with CSS so any insight would be greatly appreciated. Thanks!
Hey Alvaro, I haven’t been active on my blog for quite a while, did you find a way to solve the problem meanwhile?