Fixed width messages

From MozillaZine Knowledge Base
Jump to navigationJump to search
This article was written for Thunderbird but also applies to Mozilla Suite / SeaMonkey (though some menu sequences may differ).

Thunderbird does not normally support fixed-width messages, but you can implement fixed-width messages if you really want to.

In a normal e-mail message, the lines flow to match the width of the window or pane. Thunderbird wraps long lines by splitting them after the word nearest to the edge of the window or pane. The remaining words flow on to the following line.

In a fixed-width e-mail message, the lines are limited to a fixed number of characters, regardless of the size of the window or pane. If the window or pane is wider that the lines, the extra width is not used to display any text. If the window or pane is narrower than the lines, you see a scroll bar that allows you to scroll sideways to see the text.

Fixed width lines are only appropriate if you are using a fixed-width (monospace) font.

Sending fixed-width messages is usually a bad idea, because you cannot predict how they will be displayed by other people's mail clients. Some people will find them difficult to read.

HTML messages

HTML messages can contain a mixture of fixed-width and variable-width sections.

To write HTML messages, go to your account settings, and on the Composition & Addressing page, check the box: "Compose messages in HTML format"

Writing a fixed-width section

You cannot make fixed-width the default, but you can create a template containing a fixed-width section, and use the template to compose new messages.

To write a fixed-width section, choose Format – Paragraph – Preformat (or use the formatting toolbar to choose Preformat).

Type some text, then select the entire preformatted section, including a line before it and a line after it. (If necessary, select the entire message.) Choose Insert – HTML..., and add a style attribute to the <pre> tag so that it looks like:

<pre style="width: 60ex; white-space: normal;">

Set the width to the number of characters that you prefer. The width unit, ex, represents the width of a letter x.

Plain text messages

Go to your account settings, and on the Composition & Addressing page, clear the checkbox "Compose messages in HTML format".

Open your Options (Preferences) dialog.

On the page Composition – General, set "Wrap plain text messages at" to the number of characters you prefer.

On the page Advanced – General, press the Config Editor... button. Set the Filter to: flowed Set the following preference to the opposite of its default (for example, by double-clicking it), so that the setting is:

mailnews.send_plaintext_flowed  user set  boolean  false

Optionally set the other preference to the opposite of its default (for example, by double-clicking it). If you do this, then messages that other people send to you also appear to be fixed-width, even if the person who sent the message intended it to flow:

mailnews.display.disable_format_flowed_support  user set  boolean  true

Use your operating system tools to go to your profile directory. Then go to the chrome directory there, creating it if necessary. Edit the plain text file userContent.css, creating it if necessary. Add:

pre[wrap] {white-space: pre !important;}
pre[wrap=true] {white-space: -moz-pre-wrap !important;}

Save the file and restart Thunderbird.


  • Some messages that other people send to you might look strange with these settings.
  • Other people might find that messages you send to them look strange.
  • When bug 116688 is fixed, there will be no need to edit the userContent.css file.