[Pro] Responsive problem: photo won't butt object above when scaling

The problem is:

Positioning absolute and variable heights!

Assumed, you have two items.

One is from top 0, the other from top 100 (because the upper has a height of 100) - it will exactly fit. But now you decrease the width of the browser. The height of image1 will shrink to keep the aspect-ratio of your image. You’ll receive a (growing) gap the narrower your browser window because the second image has still the value top:100 (and isn’t aware of the changing of the image above).

Solution:

Only relative positioned items can react on each other. This is as well known as the inflow construction or even as box-in-box model. This ensures that everything is well kept together.

I hope you got the gist.

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at: