4

I've tried to change the font sizes in Alex Gorbatchev's SyntaxHighlighter .css theme files, and used font-size in the <pre> tag, etc, but nothing happens. The size won't change.

PD: this is the shCore.css main file.

Michael Anderson
  • 70,661
  • 7
  • 134
  • 187
Wyvern666
  • 633
  • 1
  • 11
  • 26
  • Post the code. I for one have no idea what `Alex's Gorbatchev SyntaxHighlighter?` is – Paul Dessert Aug 27 '12 at 22:35
  • Post the code?... What?. Im asking for a simple feature that i guess it must be implemented somewhere in Alex's Gorbatchev SyntaxHighlighter. And why the downvote? – Wyvern666 Aug 27 '12 at 22:42
  • Why the downvote? Becuase this isn't the `Alex's Gorbatchev SyntaxHighlighter` support line. There is obviously a css file somewhere that controls font size. Post that. – Paul Dessert Aug 27 '12 at 22:44
  • Did you change the font size in this id?: `.syntaxhighlighter { width: 100% !important; margin: 1em 0 1em 0 !important; position: relative !important; overflow: auto !important; font-size: 1em !important; }` – Paul Dessert Aug 27 '12 at 23:05
  • 1
    Yes. But didnt work. By the way, im reading the change logs, so i found that in much earlier version 2.0.320 it says: _"Removed font-size parameter option. SyntaxHighlighter font size is 1em, so any outer font size will be inherited by default."_ . So what that means? – Wyvern666 Aug 27 '12 at 23:08
  • @Wyvern666 post the code you tried to change in your question please. Linking to a third party site for code is not good. What happens when that link dies or moves? – George Stocker Aug 28 '12 at 23:25
  • 1
    For anyone still running into this. Just wrap the `
    ` or `
    – Michael Anderson Jun 04 '13 at 14:43

1 Answers1

3

There are a couple of places to change the font size in the code sample you posted. Since it's not clear exactly which one you're targeting, start with this:

.syntaxhighlighter {
  width: 100% !important;
  margin: 1em 0 1em 0 !important;
  position: relative !important;
  overflow: auto !important;
  font-size: 2em !important; 
}

The sample above changes the font-size to 2em's

Paul Dessert
  • 6,363
  • 8
  • 47
  • 74
  • I tried all the places in that file, and didnt work. – Wyvern666 Aug 27 '12 at 23:10
  • 1
    I'm using version 3.0.83 of the code and I changed: `.syntaxhighlighter { ... font-size: 60% !important; ...}` This for me achieved the result I was wanting (and what the OP asked for) - to get the font size looking more like what I needed. – Andrew Wyatt Feb 12 '15 at 11:16