IE10 local page won't open CSS

前端 未结 3 792
轮回少年
轮回少年 2021-01-14 16:51

Just installed IE10, and even with a \"default reset,\" when I open a local page (like C:\\Documents\\index.html), it refuses to load a simple linked stylesheet, with a stra

相关标签:
3条回答
  • 2021-01-14 17:25

    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.

    0 讨论(0)
  • 2021-01-14 17:38

    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).

    0 讨论(0)
  • 2021-01-14 17:40

    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).

    0 讨论(0)
提交回复
热议问题