+ 4
If i have some object in css with height: 45%; how to create same width?
If i have some object in css with height: 45%; how to create same width? Sorry for my English.
2 Antworten
+ 2
If your 45% is the window height's 45%, you can just use '45vh'. It will be the 45% of the screen height, even when used on width
+ 4
You can use something called "vmin" , or "vmax" (1 of them for both width and height)
vmin is the smaller size of the screen. If your screen height is smaller than its width, then vmin ==vh , or if your screen width is smaller than your screen height, then vmin == vw.
The same (but inverted) applies to vmax.
I hope you understand. 😊