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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:23:38+00:00 2026-05-26T08:23:38+00:00

I was looking to add CSS media query workaround for ie8 in my code..

  • 0

I was looking to add CSS media query workaround for ie8 in my code..

I came across css3-mediaqueries.js

http://code.google.com/p/css3-mediaqueries-js/

But could not find details or example of how to implement it in my site.

Could you please provide any example for the same.

  • 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-26T08:23:38+00:00Added an answer on May 26, 2026 at 8:23 am

    On the site it says “Usage: just include the script in your pages.” and has a few more rules on how its used. It appears to only work for media queries that are inside the style sheet and not media query attributes and won’t work with @imported CSS files.

    UPDATE

    Based on our conversation, the goal is to serve up one stylesheet for the desktop and another for tablets. The natural solution is to do the following:

    <link media="screen and (max-width: x)" href="tablet.css">
    <link media="screen and (min-width: x)" href="desktop.css">
    

    The problem is that IE6, 7, and 8 will apply both stylesheets. Fortunately, we know for a fact that IE6, 7, and 8 will never be on tablets (or at least not tablets in the modern sense), so we can use Internet Explorer Conditional Comments to prevent these versions of IE from seeing the tablet CSS. Here is an example using downlevel-revealed conditional comments:

    <![if gte IE 9]>
        <!-- This code is visible to IE9 and above and all non-IE browsers. -->
        <link media="screen and (max-width: x)" href="tablet.css">
    <![endif]>
    <link media="screen and (min-width: x)" href="desktop.css">
    

    For any non-IE browser, <![if gte IE 9]> is a nonsense tag which is ignored. For IE browsers, they do a logical check: if(version >= 9) use content. IE 6, 7, and 8 will therefor ignore the tablet css and only see <link href="desktop.css">. You could alternatively use the more verbose:

    <![if gte IE 9]>
        <!-- This code is visible to IE9 and above and all non-IE browsers. -->
        <link media="screen and (max-width: x)" href="tablet.css">
        <link media="screen and (min-width: x)" href="desktop.css">
    <![endif]>
    <!--[if lt IE 9]>
        <!-- This code is only visible to IE8 and below. -->
        <link href="desktop.css">
    <![endif]-->
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking to add functionality to a jQuery method. I have the code
I'm trying to add a .css file that targets Windows Mobile, and as media=handheld
We are looking for a solution to add a CSS class attribute to a
I'm looking to add a numeric up / down control to a .Net StatusStrip.
I'm looking to add localization to a web site (asp.net /c# if that makes
I'm looking to add a tooltip to each row in a bound datagrid in
I'm looking to add support for reading and writing video files in my application.
I am looking to add the capability for users to write plugins to the
I'm looking to add an advanced search capability to my ASP.NET/SQL Server 2005 application.
I am looking to add a local database file (.sdf) into my .NET Project.

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.