IE10 local page won't open CSS

青春壹個敷衍的年華 提交于 2019-12-01 08:37:41

I fixed it easily with a few steps:

  1. Run -> regedit
  2. Open HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.css
  3. Modify: "Content Type" from "text/plain" to "text/css"
  4. Exit regedit

IE 10 now properly reads local CSS files.

I found it!

It's OK to use the Control Panel "Default Programs / Associate a file type..." to set .css files to be opened by Notetab Light (my favorite general-purpose text editor). However, if you go into Notetab Light itself and choose View, Options, Associations, and add css to the list, this generates the error I've been seeing.

Apparently, this is producing a registry entry that causes IE10 to be unable to open a local CSS file when it's called from an HTML page. IE9 wasn't afflicted by this (I never had a problem before, and I've been using Notetab Light for ages).

Due to MIME type mismatch css was ignored in ie 10. The MIME type can be correct by a utility called FIle TypesMan It is freeware created by NirSoft. It turned out that the MIME type of .css had been changed to text/plain, preventing ie 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 FileTypesMan.exe. When FileTypesMan has finished listing all file types, scroll down in the top pane to find .css. Double-click to edit the settings. Change the value to text/css in 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).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!