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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:45:18+00:00 2026-06-05T17:45:18+00:00

I need the browser to download the appropriate script for the client browser. I

  • 0

I need the browser to download the appropriate script for the client browser.
I need some kind of switch statement that would work?

I have ;

  • (common.css) All browsers script need this file
  • (ie6.css) IE 6 script
  • (ie7.css) IE 7 script
  • (ie8.css) IE 8 script
  • (ie9.css) IE 9 script
  • (other.css) Mozilla + Firefox + Safari use the same for all versions

i have (but doesnt work)

    <link rel="stylesheet" href="common.css" type="text/css" />

<!--[if IE 6 ]>
        <link rel="stylesheet" href="ie6.css" type="text/css" />
<!--[elseif IE 7 ]>
        <link rel="stylesheet" href="ie7.css" type="text/css" />
<!--[elseif IE 8 ]>
        <link rel="stylesheet" href="ie8.css" type="text/css" />
<!--[elseif IE 9 ]>
        <link rel="stylesheet" href="ie9.css" type="text/css" />
<!--[else]>
        <link rel="stylesheet" href="other.css" type="text/css" />
<![endif]-->

Q. Ive hacked the above code from another file but cant get it to work?
If ive got it wrong, is there a better type of switch statement that can be used?

  • 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-05T17:45:19+00:00Added an answer on June 5, 2026 at 5:45 pm

    I’m fairly certain that you have to do each condition separately, and not in a switch statement

       <link rel="stylesheet" href="common.css" type="text/css" /> 
       <!--[if IE 6 ]>
           <link rel="stylesheet" href="ie6.css" type="text/css" />
        <![endif]-->
        <!--[if IE 7 ]>
           <link rel="stylesheet" href="ie7.css" type="text/css" />
        <![endif]-->
        <!--[if IE 8 ]>
          <link rel="stylesheet" href="ie8.css" type="text/css" />
        <![endif]-->
        <!--[if IE 9 ]>
          <link rel="stylesheet" href="ie9.css" type="text/css" />
        <![endif]-->
    

    If not IE

       <!--[if !IE]> -->
             <link rel="stylesheet" href="other.css" type="text/css" />
       <!-- <![endif]-->
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Perl script that uses LWP::UserAgent to download a webpage which it
Need to ensure browser compatibility as well (should work in IE8) I came across
All I need to do is download some basic text-based and image files from
Which processing is fast Client-side or Server-side? for client side processing browser need to
I have file in the form of binary array and i need the browser
I have a PHP script that produces a .CSV export file from a MySQL
Hi I'm in need to download a file from a site that requires Forms
What code do you need to add in PHP to automatically have the browser
I am detecting what kind of mobile browser a user has and would like
I need to authenticate user to view/download some of the files in my site.

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.