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.
- 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).
- Unzip the files to a local folder, and double-click
- When FileTypesMan has finished listing all file types, scroll down in the top pane to find
- Double-click to edit the settings.
- Change the value to
text/cssin the MIME Type field in the dialog box that opens.
- Click OK. Job done. IE 10 should now behave itself (well, at least as far as rendering style sheets is concerned).