Last Updated: February 25, 2016
·
1.524K
· micjamking

Quick min/max-width media query support in IE6-8

Just include the following in the <head> of your document.

<!--[if lt IE 9]>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.2.0/respond.js"></script>
<![endif]-->

The script conditionally loads respond.js, a min-width/max-width polyfill for IE6-8. The conditional comments willy only load the script if a person is using IE8 or lower.

Boom.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside