Do you use the awesome WordPress plugin “Enlighter” to embed code in your WordPress site like this?
print('hello world!')
If you’re like me, you want to be able to customize the style (such as font size) globally—not locally for each individual code snippet.
Problem: How to increase the font size of the Enlighter WordPress plugin?
To increase the font size globally, you need to complete the following steps:
- Open your WordPress editor.
- Go to
Appearance > Customize > CSS
in your WordPress editor. - Copy the following snippet into your CSS file:
.enlighter-t-bootstrap4 .enlighter span{ font-size: 16px; }
Note that you can change the font-size to 15px, 17px, or even 20px—as you like! Also note that if you use another theme/style for your embedded code than bootstrap4
, you need to set the CSS selector accordingly.
For example:
.enlighter-t-wpcustom .enlighter span{ font-size: 20px; }
This would change the font size of all Enlighter code environments that use the custom theme.
Here’s how this may look in practice:

Ah, yes—if you want to learn Python, don’t forget to download our free cheat sheets: 🙂

While working as a researcher in distributed systems, Dr. Christian Mayer found his love for teaching computer science students.
To help students reach higher levels of Python success, he founded the programming education website Finxter.com that has taught exponential skills to millions of coders worldwide. He’s the author of the best-selling programming books Python One-Liners (NoStarch 2020), The Art of Clean Code (NoStarch 2022), and The Book of Dash (NoStarch 2022). Chris also coauthored the Coffee Break Python series of self-published books. He’s a computer science enthusiast, freelancer, and owner of one of the top 10 largest Python blogs worldwide.
His passions are writing, reading, and coding. But his greatest passion is to serve aspiring coders through Finxter and help them to boost their skills. You can join his free email academy here.