Skip to content


Subversion checkout URL

You can clone with
Download ZIP


@Media Queries not working in lte IE8 due to spaces in breakpoint dimension parentheses #179

jonrandahl opened this Issue · 18 comments

8 participants


Just wanted to let everyone know of an issue I ran into in Respond.js v1.1.0 with IE9 set to IE8 or 7 view, as well as on a native IE8 install.
I had a media query set as such:
"@media only screen and ( max-width: 1280px ) {...}" <- note the spaces inside the dimension call which was then causing the browser to not render this, or any other following, adjusted viewport styles.
After a whole load of googling to no avail I went back in to see what was different in this media query to the single media query above it which was applying:
"@media only screen and (min-width:1280px) {...}" <- note: no spaces in this one, or any others after the offending one noted for that matter!
I then removed the spaces, and tested this in IE8 and 7, and both are now displaying the correct styles for the required dimensions!
Note, it's only the initial space that throws IE out, the trailing one doesn't seem to affect anything in case you're wondering.

Just thought I would share this "head-meet-desk" moment and the "warm-fuzzies" revelation that followed!

Thank you for your time and patience,


Thanks for reporting. I wish I had seen your message a lot earlier. Took me hours to figure this one out, stripping the site down to an absolute barebones example and have it still failing on IE9 (set to IE8). Then I saw the spaces in the media query... what a moment for celebration that was.


Glad to have been of service.
This was exactly what happened to me and I just thought if I could save anyone else the hassle!
Hope your build looks sweet across all the browsers!


@sumobi @jonrandahl,

You guys have any other tips on getting respond.js to work in IE8? I've followed all the main instructions (using min-width and max-width media queries, placing the script in the head after all css files, preparing to pump fists in delight...) and nothing. Nada. Zero response to my media queries in IE8. I then found this thread and ensured all my queries had no spaces. Still nothing.

Here's my main query I'm hoping IE8 will process:

@media only screen and (min-width:768px) and (max-width:1119px) {...}

I've also tried it as just "max-width" without the min-width argument. Nothing.

If you can provide any other tips, it would be SO appreciated! And I'll have a link to share on this soon.


@scottjehl hmm, no commented code in or around the query, and I tried removing the "only screen and" portion of the argument, to no avail.

any other ideas would be much appreciated, and I'll have the link available to share shortly...


I've included the proxy js file right after the main respond script, and that's not helping...any other steps that should be needed?


@jonrandahl @scottjehl here's the link:

I went ahead and took the reference to the proxy.js file out, since it wasn't doing anything. If there's another step to take other than just including the file (or you think of anything else), let me know.

Thanks so much guys. Hugely appreciated.



Thanks for the heads up on the facebook like box. I'm assuming you're referring to the code on the Discover page. It's odd that it was problematic, as it was simply the code provided by Facebook here - I've since tried modifying the single http requrest located in that code, so hopefully it's all set now.

In terms of the placement of the JS, this is my first time using Shopify and I had run into some issues with moving certain scripts to the end of the template, but I've now managed to at least get a portion of the script calls right before .

Unfortuntately, neither of these changes is helping in any way with the respond.js issue on IE8. Very odd. Let me know if you notice anything else, and thanks so much for the help here!


You just saved me on a project with this. We couldn't figure out why Respond.js wasn't working. Came here to the issues, saw your post, put in the fix that you recommended, and presto.. it's working.

Thank you so much.


Your gratitude is greatly appreciated dwilt; however neither of us would be here if it wasn't for Scott's work, go say thanks to him too!

@zachleat zachleat closed this in 583ee45

The regular expressions will allow spaces inside the parens now.

@zachleat zachleat was assigned

thank you for so much!I have this confuse so, I know what‘s wrong it is.


thanks a lot !! this help me so much, sorry but fucking ie 8 !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.