How to apply word wrap to text files viewed in Mozilla Firefox

As mentioned before, many of the public ICANN meetings have transcripts available within hours after the meetings as text files. However, a disadvantage with viewing the ICANN New Delhi 2008 meeting transcripts with Mozilla Firefox such as the transcript for “Workshop: Update on Internet Governance” held on February 11th, 2008 is that the length of the lines of text are too long for the browser window requiring you to scroll left and right to read the transcript which gets confusing with the likely result that you stop reading the transcript online or try to insert the text in a word processor or text editor to word wrap the text.

If only there was a way to word-wrap the text in the browser window…………..

Well, there is an easy solution for Mozilla Firefox users which I discovered, thanks to Tero Karvinen’s article “Making preformated <pre> text wrap in CSS3, Mozilla, Opera and IE”

To word wrap text in text files displayed in Mozilla Firefox :

  1. Locate the sub-folder called chrome in your profile folder. See http://www.mozilla.org/support/firefox/edit#profile on how to find where Mozilla Firefox stores the profile folder for different operating systems.
  2. In this chrome subfolder, edit the text file “userContent.css” with a text editor (such as Notepad). Typically, this file does not exist by default. There is a userContent-example.css in this chrome sub-folder which you can rename to userContent.css
  3. Add the following line to userContent.css :
    pre { white-space: -moz-pre-wrap !important; }
  4. Save the file, and restart Firefox for the changes in userContent.css to take effect.

With this change, any text files you view in Mozilla Firefox will automatically be word-wrapped so that you don’t have to scroll left and right to read the text file.