O'Reilly logo

Beginning CSS3 by David Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 17

image

Targeting Styles with Media Queries

Media queries are simple conditions that test one or more of a device’s features, allowing you to tailor style rules to match the device’s capabilities. This makes it possible to deliver the same HTML to smartphones, tablets, and desktop computers, but with different styles optimized for the appropriate screen size and resolution. You specify the conditions at the same time as the media type (see “Specifying the Media Type” in the preceding chapter).

CSS3 Media Queries became a formal recommendation in June 2012. So, they’re stable and supported by the latest versions of all browsers in widespread ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required