Program Resource

Resource libraries for programmers and developers

I’m using SyntaxHighlighter for formatting code.

However, updating wordpress / plugin or modifying css sometime results in undesired way. Below shows syntaxhighlighter extend outside the area.

I can directly edit .syntaxhighlighter in shCore.css and modify width to fix the issue, but it may get overwritten when updating the plugin.

I’m not familiar with internal process of wordpress, so it may not be best way to solve the problem, but below workaround worked.

Select style.css in theme file editor and add below css to end of the file.

body .syntaxhighlighter {
	width: auto !important;
}

Now width is fixed.

https://stackoverflow.com/questions/10734999/how-to-override-css-of-a-plugin-in-wordpress-from-styles-css

Print Friendly, PDF & Email

This post is also available in: Japanese