user2533808
user2533808

Reputation: 147

Media query is not working on Document Mode: ie8 Standard

I'm testing my website on different browser and everything seems working perfectly fine until i test it on Internet Explorer (Browser Mode: IE8 and Document Mode: IE8 Standards) i have no idea actually on what's happening but when i switch to Document Mode: IE9 it will work :(..

Anyone experiencing this kind of issue? hopefully someone can give me some explanation or solution on this one thanks in advance guys

By the way i'm using wordpress on my website and i try to use the Respond.js plugin and still no luck :(

Upvotes: 0

Views: 190

Answers (2)

karan3112
karan3112

Reputation: 1867

Use the below code which will include these JavaScripts for IE versions less than 9. Using the html5.js file you can also use HTML5 tags in IE8.

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

Upvotes: 3

David Taiaroa
David Taiaroa

Reputation: 25495

IE8 doesn't understand media queries out of the box.

If you need this functionality in IE<9, one option is to use respond.js .
Another option is css3-mediaqueries-js

They are similar and I've had good success with both. Depending on the specifics of your site, sometimes one might work better than the other

Good luck!

Upvotes: 1

Related Questions