HOWTO: Use a monospace font in GMail

2014-09-05 Update: Revised my Stylish answer

2012-01-09 Update: Note that pimp-your-chrome no longer works due to new Gmail style . . .

2011-04-06 Update: Added some additional options . . .

So, I have mixed feelings about GMail, but it is mostly good enough. However, if you are a system administrator, you find that the ability to render plaintext messages in a monospace font is really really important. Messages like this can get very annoying:


It is pretty lame that after these few years, GMail still has no feature to set your preferred font. But that doesn’t have to stop you! These days (2011) there are a few ways to achieve a fixed-width font in Gmail:


There are a few different ways to do this:

1) Use Stylish: Stylish is an extension available for most web browsers that allows users to easily plug in their own style overrides. I posted some instruction on Stack exchange.

2) Fixed Width Text for Gmail: An extension for Google Chrome. In 2011, this is what I use. Braindead simple:


3) This last part no longer works with the new GMail style! Pimp your chrome: This is a Firefox hack that I committed in 2007. You’re probably happier with one of the above solutions, but you can jump down this rabbit hole if you like.

See: http://3cx.org/item/34

First, you’ll have to find your profile chrome.

On Windows, you can hit Start > Search, go into “More advanced options” and check:

Then, go ahead and search for your Local Hard Drives for all or part of a file name: chrome

Hopefully, you’ll find your chrome folder, which will be named something like:
C:Documents and SettingsdjhApplication DataMozillaFirefoxProfileszzxxzzxx.defaultchrome

On Macintosh, you can just type chrome into the search box in the Finder.

Select the folder with the newer time, which should have a path like:
~/Library/Application Support/Profiles/zzxxzzxx.default/chrome

Having located the chrome folder, open that folder up, and then edit the file userContent-example.css and add the following lines to the bottom of the file:

/* GMail fixed-width font: see http://3cx.org/item/34 */
div.msg div.mb {
    font-family: monospace !important;
    font-size: 12px !important;
textarea.tb {
    font-family: monospace !important;
    font-size: 12px !important;
td.ct {
    font-family: monospace !important;
    font-size: 12px !important;

Now, do “Save as …” in your editor, and set the file name to userContent.css. Then, restart Firefox, and things should look more awesome.

Since this little hack simply sets the default style for messages, HTML messages should render just as they always have.

Read More

Categories: Technical

  • Nice, man! Thanks! That’s been killing me, and I finally got un-lazy enough about it to google and found this post. Sooooo much better.

  • Sergey Martynov

    There’s a greasemonkey script, which adds a button in gmail interface to allow you turn fixed font on and off easily: http://userscripts.org/scripts/show/37471

  • Daniel Grosche

    This works just for the old gmail-UI. Is there a way to get those changes also for the new gmail?

  • Sadly, this no longer works in 2011. Anyone have a more current solution?

  • Heya,

    So, the Fixed Width Text for Gmail Chrome extension still works just fine.  Has anyone tried Stylish?

    The userContent.css is really not going to work as the new email body doesn’t receive a consistent ID upon display.  (WTF?)

    If someone finds a better solution for Firefox please shoot me the information!