Minimum Browser Support:
CSS3 Media Queries
56.7%
Percentage of users who can view this feature (source: caniuse.com)
Uses CSS Media Queries to adapt layout depending on screen and device resolution.
Leverages CSS Media Queries to reflow content depending on screen resolution and orientation.
var queryToTest = "only all and (max-width: 400px)";
if(Modernizr.mq(queryToTest)) {
//the query is true
}Learn more about detecting feature support with Modernizr.
When running content in a browser that does not support media queries, you will need to use JavaScript to dynamically change the content based on the browser / device you are running in.
css3-mediaqueries-js is a JavaScript libraries which enables media queries in a number of browsers which do not natively support them.