New course! Every coder should learn Generative AI!
Try a free lesson0
What are the different measurements used in CSS to measure width, breath, etc
CSS measuremen
8 Answers
+ 4
Inioluwa Atanda
It depends on browsers width and height
Means it will be different for each device depending on width and height
for example
50vh = always 50% of viewport
+ 5
Inioluwa Atanda
vh means viewport height and vw means viewport width
1vw = 1% of viewport width
For more information ℹ️
You can visit : [https://www.w3schools.com/cssref/css_units.asp]↗️
+ 2
px, em, %
+ 1
Thanks so much
So how is it used??
0
How is em diferent from px
0
Pixel is a static measurement, while percent and EM are relative measurements. The size of an EM or percent depends on its parent. If the text size of body is 16 pixels, then 150% or 1.5 EM will be 24 pixels (1.5 * 16).
0
Ok thanks
How about vh?
0
I know there is, but that's where my knowledge ends.