views:

1100

answers:

4

I'm trying to get the unitpngfix to work but I can't seem to get the png to show up in IE6.

This this my code:

<html>
  <head>
    <style type="text/css">
      #boxouter {
        width: 12em;
        height: 12em;
        background: url(gradient.gif) #ffdf00 bottom repeat-x;
        position: relative;
        }
      #boxinnerbr {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 16px;
        height: 16px;
        background: url(corner.png);
        }      
    </style>
    <!--[if lt IE 7]>
            <script type="text/javascript" src="unitpngfix.js"></script>
    <![endif]-->
  </head>

  <body>
    <div id="boxouter">
      <div id="boxinnerbr"></div>
    </div>
  </body>
</html>

I've got the clear.gif in the right place and linked to properly etc, so I just can't understand why it isn't working.

+2  A: 

I also had some problems with unitpngfix and I really dislike using the [if lt IE 7] and embedding styles in the html. I found this jQuery plugin wich is unobtrusive and works well with PNG images and css backgrounds in IE6.

Eduardo Campañó
A: 

try

background-image: url(corner.png);
GateKiller
A: 

two things 1. U dont have the clear.gif file or 2. if u have it open the unitpngfix.js file and check if the path set in the first line is proper

A: 

Not really a direct answer to your question, but you might want to look at DD_belatedPNG. In my opinion it's the best PNG fix available.

Andy Ford