Syntaxhighlighter Evolved: add horizontal scrollbar

Plugin name: Syntaxhighlighter Evolved

This is a great plugin to show code on your WordPress blog. It supports many languages and is easy to use and modify.

However, if a line of code is too long, it will go to the next line instead of adding a horizontal scrollbar. The current situation is not pretty and if you have a lot of lines of code, the line numbering is messed up too.

Here is an example of what I mean:


To solve this, a single line of CSS code is required. Go to the plugin directory and find the styles folder /wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/ and edit the shCore.css file.

At the bottom, just add:

code {
white-space: nowrap !important;

Empty your cache if necessary and you have a much prettier Syntaxhighlighter without messed up line numbering.


Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.


Leave a Reply

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