Fork me on GitHub

IE CSS hack  Bottom

  • My apologies if this is already addressed but I can't find any answers in the forum.

    As usual, IE (all versions) has some bugs in displaying fonts and positioning. I want to conditionally create an IE-only stylesheet but the standard hack doesn't play well with Smarty.

    Standard hack

    Code

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


    Any suggestions or known solutions?

    --
    km
  • In Zikula 1.2.x you can use the literal tag for that:

    Code

    <!--[literal]--><!--[if IE]><!--[/literal]-->
    link rel="stylesheet" type="text/css" href="http://...
    <!--[literal]--><![endif]--><!--[/literal]-->


    Beginning with Zikula 1.3.0 there is a special plugin for browser hacks:

    Code

    {browserhack condition='if IE 6' assign='ieconditional'}
        <link href="{$stylepath}/iehacks6.css" type="text/css" rel="stylesheet" media="screen,projection" />
    {/browserhack}
    {pageaddvar name='header' value=$ieconditional}


    --
    Guite | ModuleStudio
  • Thanks! Works perfectly.

    --
    km

This list is based on users active over the last 60 minutes.