- Create Account

class causing img to be set to blankimg?

Forums > IEPNGFix > class causing img to be set to blankimg?
Author
Message

1) kitsguru Group: Members
Posts: 2 Joined: 2 May 2008 Location: canada IP: 70.66.--.--
I have two images inside a H1 tag with each having a class that floats the images to the left and right of the h1 tag.

Most of the PNG are done correctly, but these two images are switched to blank.
HTML:
<h1><img src="images/roundendl.png" class="fleft" alt="">
<img src="images/roundendr.png" class="fright" alt="">
my title
</h1>

css:
img, dt, div, h1, h1 img { behavior: url(iepngfix.htc); }
.fleft{float:left;}

I am using v1.0RC5 Preview 5

2) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 203.173.--.--
The script blanks all PNG images. It's probably a case of the filter not applying correctly for some reason. Try adding a position:relative or similar and/or width/height to those images?

- Angus.

3) kitsguru Group: Members
Posts: 2 Joined: 2 May 2008 Location: canada IP: 70.66.--.--
Well that helped but the right image is not in the correct position (it is too far too the left). Changing the margin which I use to move the image outside the tag a bit is good on the left but not the right;

#content h1 img{position:relative;
margin:0 -1em 0 -1em;
padding:0;
width:1.2em;
height:1.2em;
}


4) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 202.137.--.--
Width/height in pixels. Remeber that this script doesn't repeat or position its backgrounds within the element.

- Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.