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

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.

From Beta to Bedrock: Build Products that Stick.

Building towards bedrock means sacrificing some short-term growth potential in favour of long-term stability. But the payoff is worth it: products built with a focus on bedrock will outlast and outperform their competitors, and deliver sustained value to users over time. Liam Nugent shows us how.

User Research Is Storytelling

At a time when budgets for user experience research seem to have reached an all-time low, how do we get stakeholders and executives alike invested in this crucial discipline? Gerry Duffy walks us through how the research we conduct is much like telling a compelling story, complete with a three-act narrative structure, character development, and conflict resolution—with a happy ending for researchers and stakeholders alike.

Discover more from A List Apart

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

Continue reading