Log in

View Full Version : Firefox image scaling problem



jzhang1013
12-21-2008, 07:19 PM
Hey all here is my page (http://1013mm.com/spg/sp_index.php?file=./recent/close_to_hk.jpg) I am working on. As you can see the image won't scale, I want to scale it by height but it won't let me. Please help me. I've tried for a month already.... :( I got it to work on Safari though.

The point of this is not having to shrink all my photos.


John

bluewalrus
12-21-2008, 07:23 PM
You mean you want the image to be displayed smaller? Why not just shrink it in a photo app it will save load time and space.

Snookerman
12-21-2008, 07:47 PM
Do you want to get the image to be the same size as the browser window? Try setting the position of the wrapping div (#x) to relative and the margin of the image to 0.

jzhang1013
12-21-2008, 08:08 PM
Do you want to get the image to be the same size as the browser window? Try setting the position of the wrapping div (#x) to relative and the margin of the image to 0.

The same height yes, width no.

jzhang1013
12-21-2008, 08:20 PM
thing is that I simply coded it here (http://1013mm.com/test.html) and it works both in safari and firefox, but it doesnt work with my code i have now......

Snookerman
12-21-2008, 09:31 PM
Remove the width="100%" from the image then.

jzhang1013
12-21-2008, 11:16 PM
there is no width="100%" on the image. unless you spotted it somewhere? Main problem is that Firefox is ignoring and overriding my div container and allowing the image within the container to be bigger than the container itself....

Snookerman
12-21-2008, 11:32 PM
This is what I see in Firebug:
<img height="100%" width="100%" src="/img/x.gif"/>

jzhang1013
12-21-2008, 11:36 PM
no no the code under it is what I'm trying to change

<div id="image"><img src="yadayada.jpg" alt="" /></div>

jzhang1013
12-22-2008, 10:28 PM
no more input?

Snookerman
12-22-2008, 11:00 PM
You could try this:

#image {
background-color:#000000;
height:100%;
width:100%;
position: absolute;
}

jzhang1013
12-23-2008, 01:27 AM
You could try this:

#image {
background-color:#000000;
height:100%;
width:100%;
position: absolute;
}

WOW snooker man thank you so much what a simple solution to a 3 mont problem.....

Snookerman
12-23-2008, 09:39 AM
You're welcome! Great pictures by the way.