SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Dec 2006
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question seperate CSS for IE6

    The position of my menu looks different in ie6 when compared to Firefox. I am trying to add a seperate CSS so ie6 will only read mainie6.css and not mainfirefox.css.

    I found some tips on the url below but I cannot get it to work:
    http://www.thesitewizard.com/css/excludecss.shtml

    I tried this which is supposed to exclude the css file in the href from being used in ie6:
    <![if !IE 6]>
    <link rel="stylesheet" type="text/css" href="mainfirefox.css" />
    <![endif]>

    When I viewed my site in ie6 that CSS was still being read..

    I want to make my site look the same in all browsers and I think I need a CSS for every browser specific to its needs?

    Any ideas how I can get this going!?

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using completely separate stylesheets can be a maintenance nightmare. It would be better to have a normal stylesheet and then have a second one for IE5-6/Win that only contains the settings you need to override. The cascading part of CSS makes that very easy.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Addict
    Join Date
    Oct 2006
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with Kravvitz. That's how I built the web site aldencabinetry.com. I used FireFox on a Mac to create this site and the primary CSS file. Then I used IE-6 and built an IE-6 specific css file that overrode the properties required for IE-6. This small CSS file is conditionally include (using the <!--[if IE 6]> technique) for IE-6 browsers. I also created an IE-7 specific css file.

    mikem

  4. #4
    SitePoint Addict
    Join Date
    Dec 2006
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes this is exactly what I want to do and thats have a normal stylesheet and the parts that look different in ie6 have code that overrides the normal css for the special ie6 custom css.
    Mike - I have looked at your source from aldencabinetry.com it has helped me get a better idea of how I can achieve this.

    Thank you everyone!


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
  •