I recently answered my first question over on Programmers.SE and noticed that the font for my code snippets was smaller and looked a lot nicer than my snippets on SO. Is it possible to reduce the font size of my code markdown here on SO to match that of Programmers.SE?

I typically program in 6-8pt font so I can get as much code on screen as possible and just really liked the way the markdown looked on PSE as compared to SO.

Just a note, my browser text size is already small so reducing that overall isn't an option.

Also, since I'm not sure it was clear originally, I'm not looking to get this changed for everybody across the entire site as I know changing all the markdown on the site to match my preferences would be a bit drastic. I'm looking for a way I can change this through some sort of preferences I might not know about or some other method so that it appears different for me.

Here's an example of the difference I'm seeing taken straight from two answers I've given. Example of the difference.

  • 1
    Just for the record, as far as I can tell, I see the same font and size on both sites. – Daniel Fischer Mar 6 '13 at 18:42
  • 1
    It appears to only be a 2pt difference between the two but, just looking at the both of them side by side, it looks like a big difference. – Michael Celey Mar 6 '13 at 18:50
  • 1
    I see no such difference even having them directly next to each other. Browser thing? – Daniel Fischer Mar 6 '13 at 18:59
  • I thought that first but I don't alter my browser in any way whatsoever. I run the latest stable release of Chrome for Linux. – Michael Celey Mar 6 '13 at 18:59
  • Just took a look in Konqueror, indeed there the fontsize on Software Engineering is smaller. I'm not sure it's a different font, but tend to believe so. It's identical in SeaMonkey. – Daniel Fischer Mar 6 '13 at 19:06
  • @DanielFischer: Stack Overflow: font-family: Arial,Liberation Sans,DejaVu Sans,sans-serif; font-size: 80%; - Programmers: font-family: Tahoma,Geneva,Arial,sans-serif; font-size: 12px; - So depending on which fonts you have installed, you'd get slightly different views. – animuson Mar 6 '13 at 19:18
  • I agree with this post: the first code block is a lot easier to grasp at a glance. But to each their own. – javadba Sep 18 '18 at 4:26

No, there is no way to explicitly change the font-size at all within a post (some people do use headers and the <sub> element to achieve the effect though).

The font-size is specific to each site. Each site expects that the font will always be the same size, so changing the font-size on Stack Overflow to match Programmers would throw a lot of people off here because they don't expect it.

Formatting a post is meant to make it easier for everyone to read, not for you to make it match other sites - that's what user styles are for.

| improve this answer | |
  • I understand changing how the markdown looks for everybody or even changing how my posts appear from other people's posts would be ridiculous. I was looking for a way to make the markdown look smaller to me through some sort of preferences or other such method. I have updated my question to reflect this. – Michael Celey Mar 6 '13 at 18:59
  • @MCeley: Stack Exchange does not keep any preferences of the such. You're better off installing a plugin, such as Stylish, and writing your own CSS styles to manually override the ones on the site. – animuson Mar 6 '13 at 19:05
  • @OP If you are using Chrome, download a CSS injector extension and use that. There is one called Stylize (something like that) that I use, but I'm not at my computer right now. – Cole Johnson Mar 6 '13 at 19:11
  • I wouldn't touch those extensions with a ten foot pole. They make every page on the web take slightly longer to load. You can see it in the debugger's rendering timeline. – Abhi Beckert Jul 8 '13 at 0:45

I know a guy who knows a guy who knows a plugin for Chrome, Firefox and Opera. It's called Stylus.

You can set custom website styles and have them be permanently applied. (By Permanent I mean, until you uninstall the plugin). But you can add this plugin and simply add * { font-size: 9pt; } and make it target stack overflow.

How to reduce the font-size for StackOverflow.com

It's really easy and takes barely 3 minutes.

PS: I may or may not be half a decade late.

| improve this answer | |
  • 4
    Half a decade late, but still appreciated. – Michael Celey Nov 21 '18 at 2:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .