Skip to content

Instantly share code, notes, and snippets.

@thefella
Created March 31, 2014 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefella/9888963 to your computer and use it in GitHub Desktop.
Save thefella/9888963 to your computer and use it in GitHub Desktop.
Media Queries for old IE
/* IMPORTANT: X-UA-Compatible needs to be "IE=7,IE=9,IE=edge"
** This doesn't always work in the HTML, so needs set via the server headers
** IE7 and less will apply whatever is in the media queries. (The actual mq statement is ignored due to the \9)
** IE8, due to the header code, will act like IE7 and therefore see point above
** IE9+ will use the media queries like a proper browser
**
** Desktop version: IE8 and below
** Responsive version: IE9+, modern browsers
*/
@media screen\9, screen and (min-width: 40em) {
/* Media queries here */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment