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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:54:57+00:00 2026-05-15T03:54:57+00:00

We have a project that will need to work in IE6,7,8. I’m not that

  • 0

We have a project that will need to work in IE6,7,8.

I’m not that experienced with stylesheets, however I know there are various ways to load stylesheets depending on browser type.

My question is, is it possible to have a Master stylesheet that all of the browsers will use and then import an additional one that overwrites various styles to account for browser implementation, or do I need to just have one CSS per browser that will have mostly the same code in it just different when workarounds need to be done.

Perhaps I’ve been doing too much OO lately and I’m used to my nice inheritance etc.

  • 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-15T03:54:57+00:00Added an answer on May 15, 2026 at 3:54 am

    No sites I know of actually manually keep different versions of a big CSS file for each browser. Usually, they just keep a main stylesheet and sub-stylesheets as per in the first case, but merge them together using a script into a static file. Maintaining a different copy of all of the CSS styles for each browser is just not worth the trouble.

    The two ways you listed both are valid, and have their own advantages:

    Master stylesheet with sub-stylesheets for each browser: This method is simple and works well normally.

    • Pro: It doesn’t require you to have a script to merge the browser-specific stylesheets with the main stylesheet before they’re displayed to the user.
    • Con: More pages need to be loaded, and this might be a bit slower; CSS precedence problems may be harder to debug, since the CSS is spread across multiple pages

    Merged master stylesheet and browser-specific stylesheets: This method is ideal for big (and I mean big) sites that have lots of requests: (e.g. Yahoo, which has this CSS file that accepts a query string to merge CSS files); the Pros and Cons are basically the converse of the above.

    I recommend that you simply choose the first solution unless your site is very big; with PHP and server-side browser detection, the code might be like this:

    echo "<link rel='stylesheet' type='text/css' href='/css/main.css' />\n";
    $browser = get_browser(null, true);
    $browser = $browser['browser'];
    if ($browser == 'Firefox') {
        echo "<link rel='stylesheet' type='text/css' href='/css/firefox.css' />\n";
    } elseif ($browser == 'Internet Explorer') {
    ...
    

    Please note that it is best if your design requires no browser-specific CSS at all. Most of the time, it is not necessary and caused by a bad understanding of CSS attributes. To fix minor default browser discrepancies, a CSS library such as YUI reset can be very helpful.

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

Sidebar

Related Questions

We have a Silverlight 2 project (game) that will require a lot of character
Im sure this will be a simple one but have a project that started
I have a project that I'm working on and I need to be able
Given a situation where you have 2 projects that in total will provide enough
I have project that I'm working on that is going to require a webserver.
I have a project that I'm currently working on but it currently only supports
I have a project that I would like to start beta testing soon, it
We have a project that generates a code snippet that can be used on
I have a project that I thought was going to be relatively easy, but
I have a project that I am building with Netbeans 6.1 and I am

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.