csswordpresssyntaxhighlighter

Lines of code shifted down one from numbering in Wordpress with SyntaxHighlighter Evolved and Virtue theme


I use SyntaxHighlighter Evolved to show code on my wordpress sites. One one site using the TwentyTwelve theme, everything works as expected. However, on another that uses Virtue, all the code is shifted down one line when line numbering is turned on. I saw one comment on this, but I couldn't figure out what they were changing. Has anyone else seen this, and if so, is there any easy fix in css or similar?

Edit: to follow up, I realized that the shift does not occur in Chrome but only in Firefox. A typical occurrence is here.

enter image description here


Solution

  • I ran into the same problem. How you can fix it (and what was meant in the comment you are referring to) is:

    Edit the CSS file you are using, e.g. .../syntaxhiglighter/styles/shCore.css

    Navigate to line 44 where it says:

      vertical-align: baseline !important;
    

    and change it to:

      vertical-align: top !important;