Leo's Technical Blog

Fixed-width font on Gmail

Introduction

user

Leo Soto


tips, firefox

Fixed-width font on Gmail

Posted by Leo Soto on .
Featured

tips, firefox

Fixed-width font on Gmail

Posted by Leo Soto on .

[Update: As of November 2007, the new GMail version broke this. Here is the updated CSS]

Finally, I'm tired of not being able to read ascii-arts or citation remarks done with the '^' character just because GMail doesn't have a setting that allows me to read and compose email using a fixed-width font.

So I googled for a solution and came with this two pages :

  • GMail CSS tweaks
  • Fixed-width font with Gmail Both solutions are based on firefox and its <profile-directory>/chrome/userContent.css file. As the first one also makes some unwanted changes to the GMail UI (such as disabling the spell check link), I've almost copied the second recipe, just wrapping it in a @-moz-document domain(mail.google.com) block to make it clearer and avoid affecting other pages:
  
@-moz-document domain(mail.google.com)
{
  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;
  }
}

By the way, here are the basics about per-site user stylesheet rules