I have an image where its height is set to a percentage value (e.g. 60%
).
the problem is that in Safari browser when the browser navigation bars are hidden due to the user scrolling the image height increase (which I don't want).
I've also tried to use vh
unit instead of percentage (but the issue is still not solved)
notice in the below image (side 2) how the height of the image increased when the navigation bars are hidden.
Is there any CSS or JavaScript trick to make image height 60%
of screen height (but doesn't change when the top and bottom navigation bars are hidden)