What is difference between pixels and percentage | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is difference between pixels and percentage

21st Jul 2016, 5:09 AM
shaik mahaboob sharief
shaik mahaboob sharief - avatar
2 Answers
+ 5
Pixels (px): Pixels are fixed-size units that are used in screen media (i.e. to be read on the computer screen). One pixel is equal to one dot on the computer screen (the smallest division of your screen’s resolution). Many web designers use pixel units in web documents in order to produce a pixel-perfect representation of their site as it is rendered in the browser. One problem with the pixel unit is that it does not scale upward for visually-impaired readers or downward to fit mobile devices. Percent (%): The percent unit is much like the “em” unit, save for a few fundamental differences. First and foremost, the current font-size is equal to 100% (i.e. 12pt = 100%). While using the percent unit, your text remains fully scalable for mobile devices and for accessibility. A pixel is a pixel, a percent is a percent. 1 percent of 1200 pixels is 12 pixels. 1 pixel is always 1 pixel.
21st Jul 2016, 6:03 AM
Mahima Rajvir Singh
Mahima Rajvir Singh - avatar
+ 2
Thank you for your response
21st Jul 2016, 6:07 AM
shaik mahaboob sharief
shaik mahaboob sharief - avatar