Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts

    Serving IE/Win the correct stylesheet

    Is there an IE/Win equivalent on IE/Mac backslash hack?

    I need IE/Win to ignore @import "style.css";

    Edit: I've realised this isn't what I need... Give me a min to type up what I do need


    Edit: So far I've got this code:
    Code:
    /* IE Mac Hack \*/
    @import "style.css";
    /* End IE Mac Hack */
    /* Get this style sheet, if the browser is IE5 Mac */
    @import("ie.css");
    What I need to do is serve IE/Win ie.css, not style.css
    Last edited by gsnedders; 07-10-2005 at 11:56 PM.

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    See if this helps -

    http://www.thesitewizard.com/css/excludecss.shtml

    Think you'd be looking at using this -

    <![if !IE 6]>
    <link rel="stylesheet" type="text/css" href="not-ie.css" />
    <![endif]>

    That stylesheet is for non-IE browsers.

    Then this is for IE6+ -

    <!--[if gte IE 6]>
    <link rel="stylesheet" type="text/css" href="iespecific.css" />
    <![endif]-->

  • #3
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Ah - After playing around a bit more I found my problem - conditional comments don't play well inside <style type="text/css">

    Final code:
    Code:
            <![if !IE]>
            <style type="text/css">
            /* IE Mac Hack \*/
            @import "style.css";
            /* End IE Mac Hack */
            /* Get this style sheet, if the browser is IE5 Mac */
            @import("ie.css");
            </style>
            <![endif]>
            <!--[if IE]>
            <style type="text/css">
            @import "ie.css";
            </style>
            <![endif]-->


  •  

    Posting Permissions

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