Problem with height when the page is zoomed higher
I'm building a responsive website which is accessible in almost all devices
I've made a div with a height, which works well in 75% zoom, but when zoomed more than 100% I want the page to be scrolled and the div with the same height, but what it does is that it shriks down and down completely. What CSS property can be used to make its height fixed in a particular zoom level and make the page to be scrolled? Here's the code. please help
18 Replies
The search area is the
<div>
i said
Div in 75% zoom (image 1)
Div in 100% zoom (image 2)i want the same height in 110% zoom level which's as same as in 75% zoom
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
change until the zoom is 100%, after it crosses 100% the height should be the same
You can't really know if someone is zoomed in, or if their browser is just smaller.
You could use a
min-height
though?that won't increase when the user's zoom is lower
I also tried clamp(), but still not working as expected
min-height will set the minimum height level and wont increase
max-height will do eqally opposite to min-height
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
both
at once
but failed
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
simply, just shrink until 100% zoom, if they zoom in more than 100%, the height should be the same as in 100% zoom
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
the min-height won't make the div shrink below that it right?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
nope
anyway, im gonna leave that topic aside for now, as I completely changed the layout
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
thanks
Since you dont need it anymore, I guess it's not useful, but
max(auto, 100vh)
might have worked.thanks