Exactly…Why the width of the photo is constant (449 px)? I think here is the problem.
The script uses parent dimension for image and cell5 is inline element and doesn’t have width?
Maybe use float…But I don’t know the width of container…There will be many pictures.
The images won’t resize as soon as you move the browser window because they are in an element that stretches miles wider than the viewport and won’t be affected by the size of the viewport. Once the window is small enough the images start resizing down ok. There is no need for them to resize when they are inside a scrollbox as the scrollbox gets smaller but the content inside stretches outside the viewport.
I don’t understand. So why if you resize the browser to for example 80% and when you look at example 3 and without changing size of the browser look at http://www.projektowaniestronwww.net/photo/ you will see larger photo on home page? Look than at example 2 and the first photo has good dimensions…but images just aren’t horizontal.
The images in the horizontal example have their width based on the box inside the scrollbox. When you close the browser window the box inside the scrollbox doesn’t change at all so why should the image scale.
On your home page set the container to a large width.
Now resize the browser and the image does not change. This is what happens when you try to put them in your horizontal scrollbox.
There is no need for them to resize because the element holding them doesn’t get any smaller. You can still scroll to see the images and when the window is very small your example3 will shrink and seems to work well. I don’t see how it could work any differently.
Do you really think there is no other option to make these layouts (heights on home and gallery page) look the same?
What about {float:left} for images (problem is width of container)?
The problem is that I’m not sure if the client is going to accept that…
That didn’t change the height of images at lower size of browser window.
It sill looks excellent for larger screen…rather that for sth like 1200 resolution.
Do you think there’s any way to fix it?
The image scales up and down proportionately with the browsers window. Isn’t that what you wanted?
What is the exact problem with smaller window widths as it looks the same proportion as larger widths but just smaller. How did you want it to look as I’m not sure I’m understanding the issue?
Whatever, you need will mean adjusting the script anyway. You could try adjusting this value:
$target.css('max-height', $w/2 );
That is using the body width divided by 2 for the scaling factor. Try something like $w * .4 for a smaller image size.