Chapter 3. Media Queries

You must be shapeless, formless, like water. When you pour water in a cup, it becomes the cup. When you pour water in a bottle, it becomes the bottle. When you pour water in a teapot, it becomes the teapot.


Have you ever had a peanut butter sandwich? Yes, that’s right—a peanut butter sandwich. No jam. Just peanut butter spread between two pieces of bread.

It’s perfectly edible. It’s certainly better than eating two pieces of bread with nothing on them at all. Yet, it’s not quite satisfying. You just know there’s something missing: one ingredient that would make the whole thing much better.

You need the jam, of course.

In responsive design, media queries are the jam. (I’m envisioning strawberry, but feel free ...

Get Implementing Responsive Design: Building sites for an anywhere, everywhere web now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.