Welcome to our AtoZ CSS series! In this series, I’ll be exploring different CSS values (and properties) beginning with a letter of the alphabet. We know that sometimes screencasts are just not enough, so in this article, I’ve added a new quick tip/lesson about Media Queries for you.
M is for Media Queries
I would venture a guess that the vast majority of web designers and developers are familiar with the concept of responsive design these days. If not, check out the Media Queries screencast.
Since responsive design is so popular, it’s a good place to pick up a couple of tips for improving the way we develop websites and apps for multiple devices. Here are a couple of CSS tips to help you out.
Tip 1: Don’t use device specific breakpoints
Hopefully this goes without saying, but just in case you need a reminder or you haven't come across this best practice before, I thought it was worth reiterating.
Device specific breakpoints are easily identified in your code with media queries that look like this (comments added for clarity):
[code language="css"]
/* ipad portrait */
@media screen and (min-width: 768px;) {}
/* ipad landscape */
@media screen and (min-width: 1024px;) {}
/* iphone */
@media screen and (min-width: 320px) and (max-width: 480px;) {}
[/code]
Continue reading %AtoZ CSS Quick Tip: Creating Responsive Design with Media Queries%
by Guy Routledge via SitePoint