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 7985501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:34:29+00:00 2026-06-04T11:34:29+00:00

I have a few questions about css media queries. I. Does both css files

  • 0

I have a few questions about css media queries.

I. Does both css files (for example normal.css and lessthan1024.css) have to include all css rules? Or can lessthan1024.css include just rules that are different?

II. Does it work with browser resize? Or does page have to be refreshed?

Thanks

  • 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-04T11:34:31+00:00Added an answer on June 4, 2026 at 11:34 am

    I. Let’s say you want to have a header with a blue background, no matter the resolution. If you include in your lessthan1024.css file only what is different, that means you won’t have a blue background for the header at less than 1024px. So what do you think is the answer to your question in this case?

    II. It works on resizing the browser window. No refresh.


    That being said, I believe it would probably be better to:

    I. Use a mobile-first approach – that means that you start with the smallest display sizes as being the norm and then you start adjusting the look of your page for larger displays

    II. Put all CSS, for all display sizes in one file, using @media rules; example:

    /* base styling: common rules + smallest display rules*/
    
    @media only screen and (min-width: 35em) {
        /* adjust style for larger display */
    }
    

    The reason I believe this is better is because… well, if you use 2 .css files, then you will have some rules duplicated. Let’s say you want to change some of them. You’ll have to make the same changes in 2 places. Maybe you forget to make the changes in one file. Or maybe you don’t remember that you’ve set a padding to 1em in one file and you set it to 2em in the other file.

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

Sidebar

Related Questions

I have a few questions about storing files on the operating system. These may
I have a few questions about data synchronization. The architecture does not seem to
I have few questions about using lock to protect my shared data structure. I
I have a few questions about Xcode and interaction with GCC 4.2.1: It doesn't
I have a few questions about this after reading the iPhone documentation on it:
I have a few questions about cross-page posting in ASP.NET: What is cross-page posting
I have a few questions about Core Location. 1) Should the user refuse permission
I have a few questions about the eq() property of jQuery and how to
I have a few quick questions about the Microsoft Detours Library. I have used
There have been several questions over the past few days about the proper use

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.