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

  • Home
  • SEARCH
  • 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 8442305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:49:00+00:00 2026-06-10T08:49:00+00:00

I have a really basic question with regards to media queries I have set

  • 0

I have a really basic question with regards to media queries

I have set up some sites which work fine in displaying content with different layouts called via media queries, however on viewing them on desktop and resizing the screen the media query doesnt get called. Any pointers on where I am going wrong?

     <!DOCTYPE html>

    <html>
    <head>
        <title>Page Title</title>

        <style>
            div{
                background:red;
                width:600px;
                height:200px;
            }
            @media (min-width: 61px AND max-width: 600px) {
div {
               background:green;
}
        }
        </style>
    </head>

    <body>
    <div>Something</div>


    </body>
    </html>
  • 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-10T08:49:02+00:00Added an answer on June 10, 2026 at 8:49 am
    div {
      background:red;
      width:600px;
      height:200px;
    
      @media screen and (min-width: 61px) and (max-width: 600px) {
         background:green;
      }
    }
    

    http://jsfiddle.net/spacebeers/5NzrW/

    Your media query was outside the selector for the div. As far as things were concerned you were outputting the following:

    div {
        background:red;
        width:600px;
        height:200px;
    }
    
    background:green;
    

    So background: green was just on it’s own. Replace your code with the example at the top and it should be fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I work with python and I have a really basic question. I an array
This is a really basic question but... I have some code like this var
this is a really basic question - I have a model called Book, which
I have really basic question. How can I get form id by input element
I have a really basic question concerning unix timestamp and mysql date. I'm trying
I realize this question is pretty basic, but I'm really stuck. I have a
Alright, I have a really basic QStandardItemModel , filled with some numbers. I managed
really basic question, I have a string to generate as SQL statement that I
Really basic question. Learning Django and now working on development server with nginx set
I have another SQL/access 2007 question that seems really basic but I'm not sure

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.