I’m looking to target the wordpress syntax highliter with css to change the default font size, I cannot add any usefull css classes to the div’s and I cannot seem to target it without targeting all div’s globally!
Here’s the complete css path from g-chrome, from the auto generated div right the way through to the code.
div#"individual-ID-for-each-code-example-here".syntaxhighliter div.lines div.line.alt1 table tbody tr td.content code.string
I’ve tried targeting .syntaxhighliter and all the others, including pre with no luck, is there something simple I’m missing here?
Here’s the html:
<pre class="brush: php; title: ; notranslate" title="">
<!--CODE GOES HERE-->
</pre>
If it helps, here is the page-itself:
What is the problem in using this way:
Screenshot
Full image here…
Thanks to Praveen Kumar for your contribution, but the .css file directed to would only have changed the font size on the default theme, If I ever chose to swap themes in the future, the font size would revert back.
I changed the font-size in the shCore.css as this will apply to all of the theme templates. (Line 56 in syntax highlighter 2).
The CSS mentioned:
With
v3.6.2
, I did it in two steps.SyntaxHighlighter Settings
, setAdditional CSS Class(es)
to something like “myCustomClass`.Appearance
>Additional CSS
, enter the following: