Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8738033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:39:23+00:00 2026-06-13T10:39:23+00:00

I have seen many sites that are responsive both on desktop browsers and mobile

  • 0

I have seen many sites that are responsive both on desktop browsers and mobile phone browsers, I am working on a site and I have the following stylesheet setup: (The Hicks Design website is a good example of what I want to achieve if you need one)

/* Normal styles go here */

@media screen and (min-device-width:321px)
{
    /* Styles */
}
@media screen and (min-width:701px)
{
    /* Styles */
}
@media screen and (min-width:1025px)
{
    /* Styles */
}
@media screen and (min-width:2049px)
{
    /* Styles */
}

However my stylesheet above only seems to work on desktop browsers. (tested with Android Firefox and the default Android browser on a Sony Xperia Ray)

The Hicks design site’s rules are very similar to mine, however they make use of min and max but either for me doesn’t seem to work on both mobile and desktop browsers. (I plan on optimizing my media queries more I am just trying to get the basics to function as I want them to at the moment).

If I use max-device-width instead of max-width it becomes responsive on mobile browsers, but not desktop browsers…

I have tried the following following to get around the issue:

@media screen and (max-width:480px), screen and (max-device-width:480px)
{
    /* Styles */
}

also:

@media screen and (max-width:480px), and (max-device-width:480px)
{
    /* Styles */
}

However I don’t think either of these are correct as the web developer toolbar for Firefox complains about it. I have also tried a few variations on the above rules but still can’t get it to work.

From what I understand max-width reads the viewport width (say.. .the width of the browser window) and max-device-width reads the actual width of the screen you are using to view the site. – I’m confused why max-width doesn’t seem to read the mobile’s browser width.

I think I’m possibly missing something obvious about media queries here… It doesn’t seem to make sense that if I want my site responsive on desktop and mobile browsers I must make a copy of all of my media queries and just change the query from ‘screen and (max-width)’ to ‘screen and (max-device-width)’ or vice versa. (which I’m ashamed to even type as a workaround here)

How can I combine the (max-width) and (max-device-width) rules or how can I achieve this?

If you’d rather not read all of the above:

I am using @media screen and (max-width:480px) however it seems only @media screen and (max-device-width:480px) works on mobiles. How can I combine both of these rules to achieve a responsive design on mobile and desktop browsers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:39:24+00:00Added an answer on June 13, 2026 at 10:39 am

    There are a lot of medias out there, and if you want to select only by its properties, use the all keyword:

    @media all and (max-width:480px)
    {
        /* Styles */
    }
    

    Edit:

    Combine rules with or:

    @media all and (prop1:val1), all and (prop2:val2)
    {
        /* Styles */
    }
    

    Combine rules with and:

    @media all and (prop1:val1) and (prop2:val2)
    {
        /* Styles */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen on many sites the silverlight video player. I noticed that all
I have encountered many web sites and even desktop applications that have a breadcrumb
I have seen many sites doing that. You can see search phrases under the
Please help, clarify this issue, I have seen it on many sites now, you
I have seen many time that far pointers are used to work for TSR.
I have seen many articles and Questions/Answers Regarding Lock Escalation but following things are
I have seen many answers on stackoverflow, but I didn't find an answer that
I have seen many websites includes apple and most of asp.net sites uses <a
I have seen in many websites, that they uses facebook login button, yahoo login
I have seen this same question in many forms on this site and in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.