0

The problem is that the page displays mobile version of the site using bootstrap in Internet Explorer 8. As reading more into the topic I've found out that by default media queries are not working in IE8.

I've read topics that suggest to use respond.js. I'm doing that and I have also followed the order of including css/scripts.

In the head tag:

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_uri(); ?>" /><!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
  <script src="/js/html5shiv.js"></script>
  <script src="/js/respond.min.js"></script>
<![endif]-->

In the body tag

<script src="/js/jquery-latest.min.js"></script>
<script src="/js/bootstrap.min.js"></script>

The site is publicly accessible and not in local web server.

I must be doing something wrong because IE8 is not displaying the site as in other browsers. What could I be doing wrong?

marc_s
  • 675,133
  • 158
  • 1,253
  • 1,388
Kaarel
  • 180
  • 1
  • 12
  • Does this example from the Bootstrap docs display as expected in your IE8? http://getbootstrap.com/examples/jumbotron/ – Billy Moat Apr 17 '14 at 11:33
  • Also worth reading the IE8 info in the Bootstrap Docs if you haven't already: http://getbootstrap.com/getting-started/#support – Billy Moat Apr 17 '14 at 11:37
  • @BillyMoat I'm actually using IE 11 developer tools -> Document model = 8 and my client is using IE8. Both, my site and http://getbootstrap.com/examples/jumbotron/ are displaying mobile views. I've also read the second link you have provided. I can share the sites url if you contact me at kaarel[dot]acomply[at]gmail[dot]com – Kaarel Apr 17 '14 at 12:04
  • Maybe try this: http://www.telegraphicsinc.com/2013/10/using-bootstrap-3-with-internet-explorer-8-ie8/ – Billy Moat Apr 17 '14 at 12:07
  • @BillyMoat Thank you for your effort. I added `` right after ` – Kaarel Apr 17 '14 at 12:17
  • Can you please post the URL to the site so we can take a peek at the code? – Joe Conlin Apr 25 '14 at 00:45
  • @JoeConlin http://frontera.ee – Kaarel Apr 25 '14 at 08:25

4 Answers4

1

1. Browser

First see you are continue running scripts in browser or not.

enter image description here

Yes

jumbotron ... this site look like as you want.

enter image description here

No

jumbotron ... this site look like as mobile view. if you press no then other website also look like mobile view. I test this on IETester.

enter image description here

2. CDN issue with response.js

Use local file with response.js as said here

FYI see -- I developed www.spectraforce.com site in bootstrap 3 it working well in IE8

Community
  • 1
  • 1
Prasad Phule
  • 424
  • 3
  • 19
0

IE11 developer tools don't honour conditional comments, so your html5shiv.js and respond.min.js files aren't being included.

There's a Connect bug report describing the problem. According to this MSDN blog-post, the issue should be fixed in an IE11 update, but there doesn't seem to be a download available yet.

Richard Deeming
  • 23,013
  • 5
  • 65
  • 114
0

You need to add the Respond.js. Modernizr doesn't include that functionality, as far as I'm aware.

If you're testing in the latest version of IE, and trying to emulate ie8, your conditional tags won't work. I use this for testing old versions of IE.. https://www.virtualbox.org/

Mark Williams
  • 1,061
  • 10
  • 7
0

Try this below code.

 <head>

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" /> 

<!--[if lt IE 9]>
    <script src="http://css3-mediaqueries-js.googlecode.com/files/css3-mediaqueries.js"></script>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> 

 </head>
Piyush Marvaniya
  • 2,332
  • 2
  • 13
  • 27