WordPress + TwinHelix ‘IEPNGFIX’

If you are having trouble getting the IE PNG FIX from TwinHelix to work in your WordPress theme, make sure that you set the correct path to the .htc file in your themes stylesheet.

/* To fix IE 6 or less PNG issues */
img, div, span { behavior: url(wp-content/themes/your_theme_name/iepngfix.htc) }

If the relative path doesn’t work for you, try an absolute path instead.

/* To fix IE 6 or less PNG issues */
img, div, span { behavior: url(http://www.yourdomain.com/wp-content/themes/your_theme_name/iepngfix.htc) }

You also need to set the correct path to the image file in the .htc file.

if (typeof blankImg == 'undefined') var blankImg = 'wp-content/themes/your_theme_name/images/blank.gif';

Again, if the relative path doesn’t work, try the absolute path.

Once you have both paths set correctly everything should work fine. If you’re still having problems, chances are that the paths are still incorrect. Double check them and try again.

It took me a while to figure this out, so I hope this post saves you the bother.


  • http://www.how-to-burn-fat.com James

    Nice pick up. However, on a design that I am working on, it is only working on the index page. When I click to a post or a category page, nothing happens.

    I used both suggestions, which, as I said, works fine on the index page. Any suggestions?

  • http://intensedebate.com/people/KeithMc Keith

    Hi James,

    Try using absoluate paths in BOTH .htc and .css files. It works fine for me when I do so.

  • http://www.intensedebate.com/people/KeithMc Keith

    Hi James,

    Try using absolute paths in BOTH .htc and .css files. It works fine for me when I do so.

  • http://www.jiaohong.net jhblog

    Thanks! switching to absolute path really worked for me.

  • http://manningproductions.com c-check

    Struggled for an hour using complete URLs, i.e. "http://site.com/wp-content/etc" before finally switching it to just a root level path, "/wp-content/etc" and it finally worked. @_@

    • Keith

      Glad to hear you got it working in the end :)

  • http://trashnet.de/youloop youloop

    man I used every possible combination :( relative paths, absolute paths, server root paths,… I copied the htc-file in every directory and gave the behavior-url just the filename.. nothing seems to work :( I'm using hybrid theme framework.

  • kcoitk

    thanks a lot I've been searching for this and finally found on this site ,
    again many thanks

  • Tyyt

    this is more expandable than using an adsolute path…

    img, div { behavior: url(/iepngfix.htc) }
     

    Good luck!