IE7, IE8 support for css3 media query

css, internet-explorer-7, internet-explorer-8, media-queries

Solution

Include this meta tag in the <head>.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Internet Explorer 8 or older doesn't support media query. You can use media-queries.js or respond.js to add media query support in IE.

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

I think this two links will help you.

- http://cssmatter.com/blog/ie7-and-ie8-support-for-css3-media-query/

- http://webdesignerwall.com/tutorials/responsive-design-in-3-steps/comment-page-2

Update

css3-mediaqueries-js is moved on github

Problem

I have tried : ``` @media screen and (max-width:1024px) { .sidebar{width:630px;} } ``` to get the fix for IE7 and 8 but its not working, where as it works for IE9 and other browsers. Is there a different way of writing this. I have tried to include the css3mediaqueries js as well but no success. Is there any support at all for IE7 and IE8?

Original source

Related problems