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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:37:56+00:00 2026-05-29T05:37:56+00:00

I see some using only screen in the media queries, others using all, others

  • 0

I see some using “only screen” in the media queries, others using “all”, others using “screen and print”, others using “screen”(without the “only”), others don’t specify the media type.

I don’t intend to use specific CSS for printing or other medias. Should I use “only screen”. Should I not specify the media type?

What media type most people are using and why?

  • 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-05-29T05:37:57+00:00Added an answer on May 29, 2026 at 5:37 am

    Basically:

    • Either use media="screen" for applying your main stylesheet to all browsers, or just leave out the media attribute altogether if you don’t care about print

    • Use media="print" for applying your print stylesheet if you do care about print

    • If you’d like, include the only keyword only for media queries like screen and (max-width: 1000px) for your responsive styles (there isn’t any right, wrong or standard to follow here)

    The only keyword was introduced mainly to stop older browsers from applying stylesheets intended for other devices, like modern browsers on smartphones and tablet computers. See the Media Queries spec.

    Do not use media="only screen" for your main stylesheet. If you do, IE8 and older will completely ignore your main stylesheet, and your site will appear unstyled in those versions.


    For some background: the HTML 4 spec asks that media “types” (or media descriptors) like this:

    <link rel="stylesheet" media="screen and (max-width: 1000px)" href="resp.css">
    

    Should be parsed with the and ... part ignored, so it would be equivalent to this:

    <link rel="stylesheet" media="screen" href="resp.css">
    

    Meaning it would apply in older browsers that don’t support CSS3 media queries, but do fully support CSS2 media types. This may cause unwanted side effects, e.g. a mobile stylesheet being applied in older desktop browsers.

    In my experience, however, this has never happened; as far as I’m aware, IE7 and IE8 simply treat screen and (max-width: 1000px) as an invalid media descriptor and ignore that stylesheet altogether.

    But I like to be on the safe side, and put the only keyword in media queries intended specifically for use by modern browsers.

    Of course, this rule has been changed in HTML5 in order to be compatible with media queries in CSS3. It just won’t apply to older browsers that were released before work on HTML5 began.

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

Sidebar

Related Questions

I see some frameworks like Django using unicode all over the place so it
In the C / Unix environment I work in, I see some developers using
When using Rails date_select with :prompt => true I see some very strange behavior
I have some elements and I'm using some jQuery plugins. I want to see
I am using the .Net XslCompiledTranform to run some simple XSLT (see below for
I have some code that is using SyncEnumerator. As you can see here ,
As you can see on http://jsbin.com/erivi/ I'm using Jquery to change some image (and
I'm trying to see if anyone knows how to cluster some Lat/Long results, using
I don't see why this doesn't work. I assume that for some really lame
I'm writing an Android app in Eclipse, and displaying some text on screen using

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.