Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 4 of 4
  1. #1
    DNF Member
    gatorgrad's Avatar
    Join Date
    Mar 2005
    Location
    Kentucky
    Posts
    265
    DNF$
    10,440
    Bank
    0
    Total DNF$
    10,440
    Donate  

    two seperate css files?

    Is there a way i can use two unique .css files one if the viewed with IE and another if viewed by Firefox?

    I'm thinking there's a way but i haven't found it yet. Thanks for the help!

  2. #2
    DNF Member

    Join Date
    Apr 2005
    Posts
    198
    DNF$
    26,303
    Bank
    0
    Total DNF$
    26,303
    Donate  

    Re: two seperate css files?

    You could use Javascript to do it:

    Code:
    <script language="javascript" type="text/javascript">
    <!--
    var browser = navigator.appName;
    if (browser == "Microsoft Internet Explorer") {
       document.write('<link rel="stylesheet" href="ie.css">');
    } else {
       document.write('<link rel="stylesheet" href="ff.css">');
    }
    //-->
    </script>
    http://imgshark.com Free image hosting, No account needed, 5mb upload

  3. #3
    DNF Member
    gatorgrad's Avatar
    Join Date
    Mar 2005
    Location
    Kentucky
    Posts
    265
    DNF$
    10,440
    Bank
    0
    Total DNF$
    10,440
    Donate  

    Re: two seperate css files?

    thanks...

  4. #4
    Platinum Lifetime Member
    GlobalFusion's Avatar
    Join Date
    Jan 2005
    Location
    Australia
    Posts
    477
    DNF$
    867
    Bank
    0
    Total DNF$
    867
    Donate  

    Re: two seperate css files?

    or this in PHP (handy if JS is disabled in their browser):

    (obviously, insert it in your <head> section.

    PHP Code:
    <?php
    function inAgent($agent) {
    global 
    $HTTP_USER_AGENT;
    $notAgent strpos($HTTP_USER_AGENT,$agent) === false;
    return !
    $notAgent; }
    if ( 
    inAgent('MSIE') ) { $browser 'ie'; } ?>
    <?php 
    if ($browser == 'ie'): ?>
    <link rel="stylesheet" href="ie.css" type="text/css" />
    <?php else: ?>
    <link rel="stylesheet" href="default.css" type="text/css" />
    <?php endif; ?>
    The *one thing* necessary for ParkingSite profits
    [»»» Today's Hot Domain Sale! «««]

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Domain name forum recommended by Domaining.com