Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top