0
Welcome Guest! Login
0 items Join Now

Browser specific CSS

  • Browser specific CSS

    Posted 18 years 2 months ago
    • Hi,

      How can I create CSS code for IE6 specifically. I'm running into an issue where when I fix an IE6 issue it breaks FireFox.

      Is it really as simple as adding this to the index.php file:
      <!--[if lte IE 6]>
      <link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_ie6.css" rel="stylesheet" type="text/css" />
      <![endif]-->

      and then making entries in this CSS file for IE6?

      Thanks,
      Mike
    • www.jikometrix.net
      JIKOmetrix - Reliable web hosting
    • Dan L's Avatar
    • Dan L
    • Elite Rocketeer
    • Posts: 1453
    • Thanks: 0

    Re: Browser specific CSS

    Posted 18 years 2 months ago
    • Yup, you can use it for IE7 as well in the same way. Not sure what the "lte" bit is though...I always use:
      <!--[if IE 6]>
      <link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_ie.css" rel="stylesheet" type="text/css"/>
      <![endif]-->
      <!--[if IE 7]>
      <link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_ie7.css" rel="stylesheet" type="text/css"/>
      <![endif]-->

      ...which works fine. Interested to know what the lte is for.

      All you need to remember is to ensure you load the browser-specific CSS files last in the list, as any entries in the relevant CSS files will overwrite any previous code. And you don't need to replicate the whole section of code either, for example, if changing the margin property of a definition is all that's needed, then that's the only line you need in the CSS file.

      Apologies if you already know all this :)
    • Toolbox Digital | Dribbble | Forrst
  • Re: Browser specific CSS

    Posted 18 years 2 months ago
    • Hi,

      No oppologies needed. Thanks for the info. I did not know that the ordering mattered. This really helps.

      Sincerely,
      Mike
    • www.jikometrix.net
      JIKOmetrix - Reliable web hosting

Time to create page: 0.063 seconds