none
IE10 won't open local CSS files RRS feed

  • Question

  • I recently installed IE10 on two Win7 machines, 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.

    The console error message is: SEC7113: CSS was ignored due to mime type mismatch

    This is puzzling, inasmuch as there is no MIME type involved - this page is not being opened from a server or from localhost.

    I've hunted through the security settings, but nothing seems to change the behavior.

    Here's a simple test case. Save this HTML as index.html in a folder on your PC:
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Basic</title>
    <link href="common.css" rel="stylesheet">
    </head>
    <body>
    <p>This text should be red.</p>
    </body>
    </html>
    
    Now save this CSS in the same folder, as common.css:
    body {
        color: red;
    }
    Open index.html with Firefox or Chrome - red text, right? But if I open it with IE10, the text is black - the common.css file is not being loaded. I'm seeing exactly the same problem on a Win7/64 desktop machine and on an aging little Win7/32 netbook.

    Anyone have a clue?
    Thursday, April 4, 2013 7:52 PM

Answers

  • 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).
    Saturday, April 6, 2013 2:42 AM
  • I get that too:

    C:\>assoc .css
    .css=XWeb.css.4.0

    C:\>ftype cssfile
    File type 'cssfile' not found or no open command associated with it.

    Thanks to all who so swiftly helped with relevant and appropriate proposed solutions. Very much appreciated. Special thanks to Microsoft for not getting involved with any inane suggestions - this time.

    I have solved it in IE10 on Win7's case by re structuring/locating the css and js folders in the accordion demo folder. I put them back to the default structure from the org. code. Now it works in IE10 on Win7.

    Odd that it worked everywhere else on my system. and odd that others have similar issues for different reasons. I find IECustomizer's post above revealing - from a tech. point of view.

    "...IE Security zones have a setting for MIME-Sniffing....IE10 windows 7 has changed behavior for mapping local files to the My Computer zone, which is a hidden zone. On Win8 the My Computer zone hosts apps..."

    fwiw I find IE to be the least productive Browser. Continually. In addition, the word "security" has these days become almost totally meaningless - just like "natural" foods in the Safeway or Tesco.

    Sometimes no specific answers in a forum tell me that it's a user problem. In this case, if you adopt a Microsoft-centric computer view, it might have been. Alternatively, if you don't work for MS, it becomes an IE issue.

    Thank you again.


    "If I'd asked my customers what they wanted, they'd have said a faster horse." ~ Henry Ford

    Sunday, April 7, 2013 7:18 PM

All replies

  • Hi,

    validate your markup at validator.w3.org. Your missing a required attribute value.

    for questions about html, css or scripting for website developers please post to the MSDN Web Development forum with a link to YOUR website.

    http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads

    Regards.


    Rob^_^

    Thursday, April 4, 2013 11:17 PM
  • There are no validation errors in that code. Obviously, you didn't bother to try it yourself. That's not the issue.

    And this is not a question about web development. This is purely a technical problem with IE10. Why are people having trouble grasping this?!

    When you ask for a link to my website, you're telling me you haven't actually read the question. This code works just fine when viewed from a server (how could it not? It's the simplest of code). The problem is that IE10 refuses to open a LOCAL file.

    (And if the "missing attribute" you refer to is type="text/css", I suggest you take the time to become more familiar with HTML5, which does not require that attribute. There is only one recognized type of stylesheet, so HTML5 doesn't need to be told that it's CSS. There aren't any other choices.)

    • Edited by Early Out Friday, April 5, 2013 12:36 AM
    Friday, April 5, 2013 12:16 AM
  • Questions regarding Internet Explorer 8, 9 and 10 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to raise a question, it's highly recommended you head on over to http://answers.microsoft.com/en-us

    Rob^_^


    mmm. media
    Friday, April 5, 2013 1:51 AM
  • Everyone who doesn't know the answer wants to send me to a different venue.

    I am a web development professional, and have been in the business since before there was a "web."

    Friday, April 5, 2013 1:59 AM
  • IE10 refuses to open a LOCAL file.

    Works for me.  On W8.  Perhaps you have a security/obscurity issue?  (E.g. wrong zone?  Etc.)   What does the Developer Tools show?   Otherwise ProcMon might help show what's happening in more detail.

     
    Good luck

     
    Robert Aldwinckle
    ---

    Friday, April 5, 2013 6:11 PM
    Answerer
  • That's why I reset IE to all of its "out of the box" defaults. But truth be told, this doesn't feel like a security issue. That error message about the MIME type is just very, very strange (and that's what I'm seeing in the Developer Tools console). After all, there is no http header involved here. There's no place to specify a MIME type!

    I've run into a couple of other users who are seeing precisely the same symptoms, but others (including some on the same kind of Win7/64 platform I'm on) for whom things behave absolutely normally. Just to add to the mystery, I'm seeing the same problem on two very different machines, with different versions of the OS. I've eliminated the usual suspects, like addons. I have none enabled in IE - it's not my default browser, so I don't load it up with stuff to start with.

    I haven't tapped into any other troubleshooting tools yet, but that's probably the next step.

    Friday, April 5, 2013 9:37 PM
  • 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).
    Saturday, April 6, 2013 2:42 AM
  • after several hours troubleshooting this myself I have the same issue. IE10 on Win7.

    As another tester stated it works fine on IE10 under Win8.

    I am unsure as to the change required in the "Proposed answer/solution" above? (My .css is associated with Expression Web4 - what is the association that IE10 under Win7 wants to see?)

    Needless to say all other LOCAL websites index.html's work. Just this one simple site for a jquery accordion demo... and yes, it's the css that's not being read - at all.

    (the jquery accordion demo is from Sitepoint's Jquery Novice to Ninja Chapter5 - Section 10. The other jquery accordion demos from chapters 7, 8 and 9 with ul's and li's work fine. Section 10 has H3s and Divs.)

    IE - everyone's favorite Browser!


    "If I'd asked my customers what they wanted, they'd have said a faster horse." ~ Henry Ford





    • Edited by Aspasa Saturday, April 6, 2013 8:10 PM InSecurity Update - lol..
    Saturday, April 6, 2013 8:02 PM
  • In my case, the file association defined in the Control Panel / Default Programs / Associate a file type.... didn't make any difference. I could associate the .css extension with anything. But Notetab Light was doing something different when I made the file association within that application. It actually has an options tab where you can add file extensions to its list of the things it recognizes as text files. I'm not sure what registry entry it was lousing up.

    In your position, I guess my first move would be to use the Control Panel to associate .css with something simple, like Notepad. But I don't think that's going to make any difference. I've never touched EW, but is there a place within that application where you can create file associations? If there is, that's where I would try to break the link.

    Saturday, April 6, 2013 8:23 PM
  • hmmm.

    On Win8 my .css default in control panel shows "Unselected". And, within Expression Web it is set to open .css files in EW.

    On Win7 my .css default in control panel shows "Expression Web". And within Expression Web it is as Win8 above. i.e. EW opens css files herself.

    Before I go on a wild goose chase here, I ask myself "why are all t'other website index files opening fine in FF, IE and Chrome". I have 60 or 70 other mini sites.

    I'm thinking it's gotta be the jquery_ui_accordion code - although it looks "ok" in EW and passes "the code police" inspection.

    I hate posting code but... here it is (and makes no diff. what doctype I use)

    <!doctype html>
    <html lang="en">
    
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <title>StarTrackr!</title>
    <link href="css/sunny/jquery-ui-1.8.17.custom.css" rel="stylesheet" type="text/css">
    <link href="css/base.css" rel="stylesheet" type="text/css">
    <script src="lib/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script charset="utf-8" src="lib/jquery-ui-1.8.17.custom.min.js" type="text/javascript"></script>
    <script src="script.js" type="text/javascript"></script>
    </head>
    
    <body>
    
    <div id="container">
    <div id="header">
    <h1>StarTrackr!</h1></div>
    <div id="content">
    <h2>Welcome! </h2>
    <div id="navigation">
    <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">Buy Now!</a></li>
    <li><a href="#">About Us</a></li>
    <li><a href="#">Gift Ideas</a></li>
    </ul>
    </div>
    <p id="intro">Welcome to <strong>StarTrackr!</strong> the planet's premier celebrity tracking and monitoring service. Need to know where in the world the best bands, musicians or producers are within 2.2 square meters? You've come to the right place. We have a very special special on B-grade celebs this week, so hurry in! </p>
    <p id="disclaimer">Disclaimer! This service is not intended for the those with criminal intent. Celebrities are kind of like people so their privacy should be respected.</p>
    <div id="celebs">
    <h2 class="heading">Our Celebrities</h2>
    <p class="info">We have an ever changing roster of newly chipped celebrities. But it can take as little as a week for the little critters to realise they've been tagged - so you have to be fast! </p>
    <div id="accordion">
    <div>
    <h3><a href="#">A-List Celebrities</a></h3>
    <ul>
    <li><a href="#">Johny Stardust</a></li>
    <li><a href="#">Beau Dandy</a></li>
    <li><a href="#">Kellie Kelly</a></li>
    <li><a href="#">Darth Fader</a></li>
    </ul>
    </div>
    <div>
    <h3><a href="#">B-List Celebrities</a></h3>
    <ul>
    <li><a href="#">Sinusoidal Tendancies</a></li>
    <li><a href="#">Steve Extreme</a></li>
    </ul>
    </div>
    <div>
    <h3><a href="#">Has Beens</a></h3>
    <ul>
    <li><a href="#">Duran Duran Duran</a></li>
    <li><a href="#">Mike's Mechanic</a></li>
    </ul>
    </div>
    <div>
    <h3><a href="#">Barely Famous Celebrities</a></h3>
    <ul>
    <li><a href="#">Lardy Dah</a></li>
    <li><a href="#">Rove Live</a></li>
    </ul>
    </div>
    </div><!-- end accordion -->
    </div><!-- end celebs -->
    

    I've even messed about with those nested div's and what not in the accordion section. No happy.


    "If I'd asked my customers what they wanted, they'd have said a faster horse." ~ Henry Ford

    Sunday, April 7, 2013 1:22 AM
  • changing .css file association to notepad in control panel (on Win7) = No happy...!

    "If I'd asked my customers what they wanted, they'd have said a faster horse." ~ Henry Ford


    • Edited by Aspasa Sunday, April 7, 2013 1:26 AM Ist release was for public to debug.
    Sunday, April 7, 2013 1:26 AM
  • IE Security zones have a setting for MIME-Sniffing....

    IE10 windows 7 has changed behavior for mapping local files to the My Computer zone, which is a hidden zone. On Win8 the My Computer zone hosts apps.


    Rob^_^

    Sunday, April 7, 2013 4:21 AM
  • changing .css file association to notepad in control panel (on Win7) = No happy...!  

    FWIW on W7 I found that I had only an association but no specific filetype and the test.html file worked as desired there too.   Same conditions as on W8.

    <cmd_output>

    D:\>assoc .css
    .css=CSSfile

    D:\>ftype CSSfile
    File type 'CSSfile' not found or no open command associated with it.

    </cmd_output>

    Sunday, April 7, 2013 11:59 AM
    Answerer
  • I get that too:

    C:\>assoc .css
    .css=XWeb.css.4.0

    C:\>ftype cssfile
    File type 'cssfile' not found or no open command associated with it.

    Thanks to all who so swiftly helped with relevant and appropriate proposed solutions. Very much appreciated. Special thanks to Microsoft for not getting involved with any inane suggestions - this time.

    I have solved it in IE10 on Win7's case by re structuring/locating the css and js folders in the accordion demo folder. I put them back to the default structure from the org. code. Now it works in IE10 on Win7.

    Odd that it worked everywhere else on my system. and odd that others have similar issues for different reasons. I find IECustomizer's post above revealing - from a tech. point of view.

    "...IE Security zones have a setting for MIME-Sniffing....IE10 windows 7 has changed behavior for mapping local files to the My Computer zone, which is a hidden zone. On Win8 the My Computer zone hosts apps..."

    fwiw I find IE to be the least productive Browser. Continually. In addition, the word "security" has these days become almost totally meaningless - just like "natural" foods in the Safeway or Tesco.

    Sometimes no specific answers in a forum tell me that it's a user problem. In this case, if you adopt a Microsoft-centric computer view, it might have been. Alternatively, if you don't work for MS, it becomes an IE issue.

    Thank you again.


    "If I'd asked my customers what they wanted, they'd have said a faster horse." ~ Henry Ford

    Sunday, April 7, 2013 7:18 PM
  • I get that too:

    C:\>assoc .css
    .css=XWeb.css.4.0

    C:\>ftype cssfile
    File type 'cssfile' not found or no open command associated with it.

    It would be more relevant in your case to look at

    ftype XWeb.css.4.0

    or perhaps more completely

    ftype  |  find /i  "css"

     

    ; )

     
    ---


    Monday, April 8, 2013 5:30 AM
    Answerer
  • It would be more relevant in your case to look at

    ftype XWeb.css.4.0

    or perhaps more completely

    ftype  |  find /i  "css"

     


    C:\>ftype XWeb.css4.0
    File type 'XWeb.css4.0' not found or no open command associated with it.

    C:\>ftype XWeb.css.4.0
    XWeb.css.4.0="C:\Program Files (x86)\Microsoft Expression\Web 4\ExpressionWeb.exe" /dde

    C:\>ftype | find /i "css"
    CSS3Menu="C:\Program Files (x86)\CSS3 Menu\Css3Menu.exe" "%1"
    XWeb.css.12.0=C:\PROGRA~2\MICROS~2\WEB2~1\WEBDES~1\EXPRWD.EXE "%1"
    XWeb.css.3.0="C:\Program Files (x86)\Microsoft Expression\Web 3\ExpressionWeb.exe" /dde
    XWeb.css.4.0="C:\Program Files (x86)\Microsoft Expression\Web 4\ExpressionWeb.exe" /dde
    XWeb.xweb3css.3.0="C:\Program Files (x86)\Microsoft Expression\Web 3\ExpressionWeb.exe" "%1"
    XWeb.xweb4css.4.0="C:\Program Files (x86)\Microsoft Expression\Web 4\ExpressionWeb.exe" "%1"
    XWeb.xwebcss.12.0=C:\PROGRA~2\MICROS~2\WEB2~1\WEBDES~1\EXPRWD.EXE "%1"

    I thought I was a geek. I have no idea what this means! (funnily enough just like the oxymoron "computer security")


    "If I'd asked my customers what they wanted, they'd have said a faster horse." ~ Henry Ford

    Monday, April 8, 2013 4:39 PM
  • Due to MIME type mismatch css was ignored in ie 9 and 10. The MIME type can be correct by 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.

    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).
    • Proposed as answer by Sunil Tanwar Friday, September 13, 2013 5:11 PM
    Friday, September 13, 2013 5:10 PM