Fixing Google Syntax Highlighter for WordPress

After installing the aforementioned plugin, I soon discovered the CSS was not being implemented correctly! It turned out that in my particular version of Wordpress, the default style.css file contained 'more specific' CSS properties than the plugin. This lead to the highlighted code looking weirdness... so I fixed it!

This is a 30 second hack - open the default style.css file and search: html>body .entry ul and html>body .entry li removing the html>body part from each.

Open the 'SyntaxHighlighter.css' file for the plugin and change the the .dp-highlighter ol li.alt entry to look like this:

.dp-highlighter ol li.alt
{
	background-color: #fff;
	border-top: 0px;
	border-bottom: 0px;
}

Tags: , , ,

2 Responses to “Fixing Google Syntax Highlighter for WordPress”

  1. jmcd Says:

    Hey,

    Thanks very much! I followed your instructions, and everything looks good now.

  2. how to fix syntax highlighting? – ?ukasz Baran Blog Says:

    [...] This was a clue [...]

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image