0

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

Prafulla
  • 29
  • 1
  • 6
  • possible duplicate of [media queries internet explorer](http://stackoverflow.com/questions/6309465/media-queries-internet-explorer) – Jonathan Lonowski Jul 11 '13 at 09:34
  • If this is the first time working with legacy browsers and you plan to do so more in the future, i'd suggest doing some research into which browsers support what features and the various inconsistencies between them. http://caniuse.com/ as an example. – Xareyo Jul 11 '13 at 09:36

2 Answers2

1

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.

dsgriffin
  • 66,495
  • 17
  • 137
  • 137
0

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.

Ermir
  • 1,391
  • 11
  • 25