Forum Moderators: not2easy
a.icon {
padding-right: 16px;
background: url('myimage.png') center right no-repeat;
}
IE 7 supports alpha transparency, so it does fine with the exact same code. Unfortunately, I still have to design with IE6's ~50% marketshare in mind...
Which of course led me to the old AlphaImageLoader [msdn2.microsoft.com] hack. Basically, you give IE the following filter in your CSS:
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myimage.png',sizingMethod='crop');
...and assuming the element hasLayout, your transparent PNG will show up just great.
The problem is, it always puts the image at the top left of your element, and I need it to appear at the middle right.
I tried all three sizingMethod values (image, crop and scale) with varying results, but nothing that seemed like it would work.
So referring back to my initial CSS snippet...is there any way to get that result with a transparent PNG in IE 6?
[edited by: MatthewHSE at 5:19 pm (utc) on Jan. 12, 2008]