Prafulla
Prafulla

Reputation: 29

Media Queries not working in Internet Explorer ie6-ie8

the code is given which was written for css but not working at all in IE(6-8)

 @media screen and (max-width: 340px) {
.topmaindivleft{
width:100%;
margin:0px;
padding:0px;
height:auto;
float:left;
}
.topmaindivright{
width:100%;
margin:0px;
padding:0px;
height:auto;
float:left;
}
}

want to know some codes to make it work in Ie6-8 for making responsive website

Upvotes: 0

Views: 8551

Answers (2)

Ermir
Ermir

Reputation: 1451

Internet Explorer 6-8 do not support CSS3 Media Queries. However, there is a way to simulate such functionality, by using this JavaScript Polyfill. Polyfills are scripts which simulate non-existing functionality using JavaScript.

Upvotes: 0

dsgriffin
dsgriffin

Reputation: 68596

That's because media queries aren't supported in IE6 through to IE8.

This polyfill, called Respond.js, may help you however - https://github.com/scottjehl/Respond.

Respond.js - A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)

Here's a demo example.

Upvotes: 1

Related Questions