开发者

ie6 image stretch and scale

I need to be able to stretch a image background to fit the window size now it works in all browsers except for ie6 I have endlesly searched the internet for a solution and tried all things I have found but nothing seems to work in ie6

here is my demo site if you have ie6 you will be able to see my problem I need it too stretch the full width and height with out it distorting the image at all

http://demo.jigsawfinance.com/

any one know a solution that will work I have the img tag etc but still no avail

for those without ie6 here is a 开发者_开发知识库capture of the screen veiw

ie6 image stretch and scale

as you can see I have alot of white space where the image is supposed to expand too


Have a look at this: Stretch and scale a CSS image in the background - with CSS only

also this layout seems to work in IE6: http://www.cssplay.co.uk/layouts/background.html


There is a way for CSS 3 to do this but since IE6 does not support it, I think your best bet is to use the img tag.

e.g.

<img src="../images/jigsaw_logo.png" style="width: 100%; position: absolute; top: 0; left: 0; z-index: -1;"/>

This will retain the proportion of your image and move it back.

Also take note that in IE's css, you can specify expressions, so try the one below if you're having trouble with the normal 100% css width:

width: expression(document.body.clientWidth + 'px');


Image stretching with no quality loss for IE6:

<div Style="Position:Relative; Width:2000px; Height:1500px;
Filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
Src='C:\SomePic.jpg',SizingMethod='scale');"></div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜