CSS styles not being loaded in IE8

后端 未结 2 1410
Happy的楠姐
Happy的楠姐 2021-01-19 00:41

I have a very strange issue in that no CSS styles are being loaded in IE8 (maybe IE7 as well but cannot check). My site is at http://www.leavetrackapp.com/ and my master CSS

相关标签:
2条回答
  • 2021-01-19 01:19

    The problem is not that the style sheets are not imported, the problem is that you are using the HTML5 section tag, which IE8 and earlier does not recognise.

    If you change the section tags to div tags, it will work better.

    0 讨论(0)
  • 2021-01-19 01:34

    @Guffa put me onto the right track with this: the problem is that the HTML5 elements aren't working in Internet Explorer 8 and lower.

    Modernizr would fix this, but: http://www.modernizr.com/docs/#installing

    Drop the script tags in the <head> of your HTML. For best performance, you should have them follow after your stylesheet references. The reason we recommend placing Modernizr in the head is two-fold: the HTML5 Shiv (that enables HTML5 elements in IE) must execute before the <body>, and if you’re using any of the CSS classes that Modernizr adds, you’ll want to prevent a FOUC.

    So, you simply need to move Modernizr from just before </body> to inside the <head> element.

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