Solved

Responsive design and Media Queries

Posted on 2013-01-22
2
553 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses four methods for overlaying images in a container on a web page
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 dynamically set the form action using jQuery.

728 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