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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:58:05+00:00 2026-05-25T09:58:05+00:00

I want to apply different css on different browsers. I want to run one

  • 0

I want to apply different css on different browsers.

I want to run one css when it is safari and second for all others.

How can I detect that and apply css according to that?

  • 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-25T09:58:05+00:00Added an answer on May 25, 2026 at 9:58 am

    You can use CSS browser selectors for this. There are different solutions available for this on the net.

    For example:

    CSS Browser Selector

    The CSS Browser Selector is a small JavaScript library which allows you to include different cascading style sheets (CSS) for each browser.

    An example:

    <style type="text/css">
    .ie .example {
        background-color: yellow
    }
    .ie7 .example {
        background-color: orange
    }
    .opera .example {
        background-color: green
    }
    .webkit .example {
        background-color: black
    </style>
    

    If you Google for “different css per browser” you’ll find other solutions as well, but most of them boil down to similar solutions.

    Another way would be to detect the browser type and capabilities in ASP.NET so that you can render the appropriate HTML / CSS / …etc. You can find more information on that topic here:

    http://msdn.microsoft.com/en-us/library/3yekbd5b.aspx

    For example:

    private void Button1_Click(object sender, System.EventArgs e)
    {
        System.Web.HttpBrowserCapabilities browser = Request.Browser;
        string s = "Browser Capabilities\n"
            + "Type = "                    + browser.Type + "\n"
            + "Name = "                    + browser.Browser + "\n"
            + "Version = "                 + browser.Version + "\n"
            + "Major Version = "           + browser.MajorVersion + "\n"
            + "Minor Version = "           + browser.MinorVersion + "\n"
            + "Platform = "                + browser.Platform;
    
        TextBox1.Text = s;
    }
    

    The Browser property of the Request returns a HttpBrowserCapabilities object. It contains information on the capabilities of the browser that is running on the client.

    http://msdn.microsoft.com/en-us/library/system.web.httpbrowsercapabilities.aspx

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

Sidebar

Related Questions

I want to apply some CSS to text that I can't get marked up
I have Rails polymorphic model and I want to apply different validations according to
I want to apply different css properties depending on which browser is used, If
I want apply margin property for my html newsletter But Gmail ignores this CSS
I want to apply a function to all columns in a matrix with MATLAB.
We all know that CSS prefix for Mozilla (Gecko), when we refer that property
I want to rewrite my robots.txt for all domains but main one (I have
I want to apply different borders to image in my iphone application. I am
I want to know can we apply jQuery on JavaScript objects. I had few
CSS Question: If two different selectors apply to an element, who wins? I know

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.