Grow your CSS skills. Land your dream job.

Transparent png in IE6

  • # June 7, 2008 at 6:23 pm

    I have a problem with some transparent png’s in IE6. Normally everything works good with the IE PNG Fix, but not this time. I’ve tried everything, even tried the following code in ie6.css , but it still don’t works.

    Code:
    * {
    behavior: url(‘iepngfix.htc’);
    }

    The link is http://www.edmin2.nl/temp/grip2 and the problem is with the navigation at the bottom of the page.

    And besides asking for a solution for this problem I would really like to hear your opinion about the xhtml and css structure… Did I do a good job?

    Thanks in forward!

    # June 8, 2008 at 8:26 pm

    I’ve had some weird problems with iepngfix.htc before. Two pieces of advice that always seemed to clear up random problems for me:

    – Make sure the images you’re applying the .htc to have dimensions specified. I had a problem once where certain images just wouldn’t show up with transparency, even though other ones on the page did, and it was because I didn’t have dimensions set. Set both height and width, either inline or through CSS.

    – Try applying the .htc only to images, or, better yet, create a class called "pngfix" or something with the .htc and then apply that only to the images you want to be transparent. The reason is that the more elements you apply the .htc behavior to, the longer the page takes to load, and IE seems to choke sometimes on high numbers of images. Right now your CSS is applying the behavior to every single element on the page, whether or not it actually needs it.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".