IE 10 fails to display styles locally

I’ve just spent the last couple of hours battling with Internet Explorer 10 failing to render styles when viewing a web page on my local computer. The problem was with a static HTML page loaded directly from the local file system, not served through localhost. The page displayed correctly in other browsers, so there was obviously nothing wrong with the code. In fact, I had viewed the same page several times before in IE 10 without difficulty. For some reason, it was now ignoring my styles.

I launched the IE Developer Tools, and eventually found this error message in the Console after reloading the page:

“CSS was ignored due to mime type mismatch”

Googling that phrase made me realize I was far from alone. The culprit appears to be installing a new program that automatically associates itself with CSS files. The frustrating thing was that none of the forum posts and articles I read seemed to point to a solution that would work for me.

After fruitlessly poking around in the Windows Registry, and trying to change file associations in the Control Panel, I found a utility called FileTypesMan that solved the problem for me in minutes. It’s freeware created by NirSoft, and is compatible with any version of Windows from Windows 98 to Windows 7 (I don’t know about Windows 8). It turned out that the MIME type of .css files had been changed to text/plain, preventing IE 10 from rendering my styles. Using FileTypesMan to change it back to text/css fixed the problem.

  1. Download FileTypesMan from the NirSoft site. Use the links near the bottom of the page to select the correct version for your operating system (there are different versions for 32-bit, 64-bit, and Windows 98/ME).
  2. Unzip the files to a local folder, and double-click FileTypesMan.exe.
  3. When FileTypesMan has finished listing all file types, scroll down in the top pane to find .css.
  4. Double-click to edit the settings.
  5. Change the value to text/css in the MIME Type field in the dialog box that opens.
  6. Click OK. Job done. IE 10 should now behave itself (well, at least as far as rendering style sheets is concerned).
This entry was posted in CSS. Bookmark the permalink.

4 Responses to IE 10 fails to display styles locally

  1. Kathy Piper says:

    THANK YOU so very much! This problem has been bugging the heck out of me ever since I upgraded to IE10. I hadn’t been able to locate a solution until I found your post. I find it hard to believe that Microsoft overlooked this issue (or maybe not so hard to believe). Thanks again!

  2. David Powers says:

    Hi Kathy, Microsoft didn’t overlook the issue. It was done deliberately to improve security in Internet Explorer. The annoying part is that it’s so difficult to find out how to change the MIME type of a local file.

  3. Ben says:

    Nirsoft is really amazing. Many times I, too, have run into a small, irritating problem that is fixed or made immensely simpler by one of his prescient utilities. To Nir! Thank you, sir.

  4. base64 says:

    wow nirsoft rules. thanks for sharing it.