Viewing MSDN code samples in Firefox or Mozilla browsers

UPDATE: This should no longer be required - apparently the MSDN CSS has been fixed to support Firefox.

The MSDN facelift (not MSDN2) hosed the formatting of code samples in Firefox and Mozilla browsers. To fix it, add this to your userContent.css file (chromEdit is the easiest way to modify this file):

/* Microsoft MSDN code stylesheet */
pre
{
 white-space: pre !important;
}

[Via WebLogs @ DotNetJunkies.com]

2 Comments

  • Dude your tagline is hilarious!!! That movie was awesome.

  • Scott -

    Agree, although you could narrow the definitions a bit so they'd be unlikely to be applied on other sites:



    /* Microsoft MSDN code stylesheet */

    pre.syntax

    {

    white-space: pre !important;

    }



    pre.code

    {

    white-space: pre !important;

    }



    This could be nested a bit further, so would only match the nested classes that MSDN uses.

Comments have been disabled for this content.