Explain | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Explain

measuering with % and px is the same and why is that?

24th Jun 2018, 6:01 AM
Tharindu Warnapura
Tharindu Warnapura - avatar
3 Answers
+ 3
Hello, Tharindu Warnapura ! Pixels (px) depend on the browser. This is the absolute size that you will see on the screen. Em are a kind of percent. It refers to the size of the base text. The value of 1 em means the same as 100 percent. But you can also say this in the opposite way: the percentage value is just Em multiplied by 100. Points (pt) are what you would like to use on print media.
24th Jun 2018, 6:09 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 6
% is percent of available space. px is pixels. So 50% is half way across the screen. 50px is just a short distance across.
24th Jun 2018, 6:08 AM
bobbie
bobbie - avatar
+ 1
tnx
24th Jun 2018, 6:09 AM
Tharindu Warnapura
Tharindu Warnapura - avatar