Solved

Responsive design and Media Queries

Posted on 2013-01-22
2
521 Views
Last Modified: 2013-01-24
I'm creating my first site using Responsive design.  I want to make sure I cover the most popular device sizes.  Please look at the following list and let me know if I should use different numbers, or if I should be aware of anything.

I'm looking for expert advice and comments.

@media screen and (max-width:320px) {}
@media screen and (min-width:321px) and (max-width:639px) {}
@media screen and (min-width:640px) and (max-width:959px) {}
@media screen and (min-width:960px) and (max-width:1279px) {}
@media screen and (min-width:1280px) and (max-width:1599px) {}
@media screen and (min-width:1600px) {}
@media screen and (min-width:1920px) {}
@media print {}

PS.. Do I need to place anything in the head so My CSS knows what the media screen width is?
0
Comment
Question by:rgranlund
2 Comments
 
LVL 25

Assisted Solution

by:Kyle Hamilton
Kyle Hamilton earned 250 total points
ID: 38808257
what you have is fine. you dont need anything in the head.

personally, i try to make my media queries device agnostic, and base them more on what my layout requires. that way you're not tied to any particular devices. but it's not that big a deal.
0
 
LVL 9

Accepted Solution

by:
darjimaulik earned 250 total points
ID: 38809717
Hi,
Your Media Query looks fine.

We generally create our responsive design in following way (Simple method)

In the same sequence.
Any Common Style should be placed before this query.

Advantage of this:
parameters which are changed for particular style should be placed in between.

@media screen and (max-width:980px)

@media screen and (max-width:700px)

@media screen and (max-width:480px)

Sample would be

@media screen and (max-width:700px)
{
    #content
    {
        width: auto;
        float: none;
    }
    #sidebar
    {
        width: auto;
        float: none;
    }
}

Open in new window

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now