[thelist] PNG bg-Positioning

Rob O'Rourke rob at sanchothefat.com
Thu Jan 11 20:58:14 CST 2007


max case wrote:
> Hi all,
>
> Hoping someone can help out with this problem. PNGs with ie6
> I found the fix to get them to display properly.
> My problem is I would like the BG image aligned right (you can see how it
> should look in Firefox).
> Any suggestions would be appreciated, since I haven't found anything
> searching and hacking at it.
>
> Sample Page:
> http://plankprojects.com/lab/png/
>
>
> I've tried finding a DXImageTransform filter for position, but I can't seem
> to find it.
>
> Thanks,
> Max
>   

Hello Max,

It's one of those annoying cases where there isn't a good solution. 
Filters aren't really css so they can't be controlled as such and no 
positioning can be done with them. All you can do with them is change 
the sizingMethod.

    * scale - scales the image to fit the container a filter is applied to
    * image - resizes the container to the images size
    * crop - crops the image inside the container

Unfortunately the background positioning of the filter is top left. Not 
much you can do about it.

Basically you need to decide if it's really necessary or if you can feed 
a gif to IE instead. Another option is to put an empty div in with 
id="ie-filter" and size and position it to the exact dimensions of the 
filtered background image using the * html hack (IE6 and below only), if 
that makes sense.

Rob O





More information about the thelist mailing list