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
Melodium
MelodiumOP3y ago
The search area is the <div> i said Div in 75% zoom (image 1) Div in 100% zoom (image 2)
Melodium
MelodiumOP3y ago
i want the same height in 110% zoom level which's as same as in 75% zoom
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Melodium
MelodiumOP3y ago
change until the zoom is 100%, after it crosses 100% the height should be the same
Kevin Powell
Kevin Powell3y ago
You can't really know if someone is zoomed in, or if their browser is just smaller. You could use a min-height though?
Melodium
MelodiumOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Melodium
MelodiumOP3y ago
both at once but failed
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Melodium
MelodiumOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Melodium
MelodiumOP3y ago
the min-height won't make the div shrink below that it right?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Melodium
MelodiumOP3y ago
nope anyway, im gonna leave that topic aside for now, as I completely changed the layout
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Melodium
MelodiumOP3y ago
thanks
Kevin Powell
Kevin Powell3y ago
Since you dont need it anymore, I guess it's not useful, but max(auto, 100vh) might have worked.
Melodium
MelodiumOP3y ago
thanks
Want results from more Discord servers?
Add your server