CHAPTER 3

image

The Power of Media Queries

Chapter 1 introduced CSS3 with one glaring omission: media queries was not discussed. And for good reason; media queries are such a big area of responsive development they deserve their own chapter.

Media queries are core to responsive design because they allow developers to target specific CSS styles based on the capabilities of the device. The most common capability to target is the viewport width; however, there is much more to media queries than this, and I will explain these capabilities in this chapter.

This chapter will cover:

  • An introduction to media queries
  • Using media queries in CSS
  • Mobile first vs. ...

Get Beginning Responsive Web Design with HTML5 and CSS3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.