The A List Apart Blog Presents:

The Virtues of Vertical Media Queries

Article Continues Below

Devices come in all shapes and sizes, and pivot between portrait and landscape orientation, often in a single session. And, lest we forget, desktop and laptop browsers can also be contorted into all sorts of shapes (and not just by web geeks trying to see if a site is responsive). Just as we had to stop ignoring skinny viewports, it’s time to stop ignoring short (and tall!) ones and start employing them to creative and user-pleasing effect.

Strangely enough, the only prominent example of a creative use of vertical media queries comes from a company that, while known for its design leadership in other areas, has made rather a point of ignoring responsive design. (I won’t name them here, but they make iPhones, iPads, and MacBooks.) Happy Cog’s Anthony Colangelo deconstructs the Cupertino-based company’s vertically responsive page, makes a compelling case for vertical media queries generally, and even shares vanilla and Sass CSS samples showing how it’s done in yesterday’s brief yet pungent Cognition article, Go Vertical.

2 Reader Comments

  1. I used a vertical media query all by itself recently, actually. I’m redesigning my personal site, and I used a set of vertical media queries to make sure that the carousel on the homepage (almost) always fits: http://coyote.byjoby.com/

    That home page has the distinction of using both horizontal and vertical media queries, which operate independently of each other. The sub-pages of the site are also noteworthy in that they mix px- and em-based media queries as is appropriate for different page elements.

    I’m rather proud of it, even if I haven’t cobbled in support for IE7-8 yet.

  2. I’ve been finding vertical media queries super handy for logic that will allow for a fixed sidebar or header (I wrote about it for CSS Tricks here: http://css-tricks.com/responsive-web-above-the-fold)

    A warning: combining complex horizontal and vertical media queries can make things really confusing if you don’t stay super organized!

    So far my vertical responsive styles have always been one breakpoint (literally tall screens get something fixed). Even this doubles the responsive testing one has to do! I hate to think about doing QA on a layout that has several breakpoints on each axis!

Got something to say?

We have turned off comments, but you can see what folks had to say before we did so.

More from ALA

Designed for a Dead Language

Every language app in your pocket inherited a teaching method built for Latin. Understanding why that happened is a more useful design lesson than anything the apps themselves can teach you.
Uncategorized

Design for Amiability: Lessons from Vienna

Computing was born in a Viennese café. Between 1928 and 1934, while Hitler plotted and Europe crumbled, a motley crew of mathematicians, philosophers, architects, and economists gathered weekly to puzzle out the limits of reason—and invented Computer Science in the process. What made their collaboration possible wasn't just brilliance (though they had plenty). It was amiability: the careful design of a social space where difficult people could disagree without destroying each other. Longtime A List Apart contributing author Mark Bernstein mines this forgotten history for lessons that might just save today's embattled web from its worst impulses. Spoiler: it involves better coffee service and the looming threat of public humiliation.

Discover more from A List Apart

Subscribe now to keep reading and get access to the full archive.

Continue reading