difference between %and pixel | Sololearn: Learn to code for FREE!

+1

difference between %and pixel

6/6/2016 2:58:05 PM

tarun prasad

2 Answers

New Answer

+2

You will notice that % is USUALLY better when you change screen sizes. you should use % to make responsive designs. px means pixels. Keep in mind that different devices have different screen sizes. a laptop screen is usually smaller than a desktop

0

for eg if you like to place sth in the middle of the site you would have to take the width and divide it by 2 to get the center or you could just write 50% (means 50% of the width for eg of the part of page you can see) it's often used to programm websites once for every device because the width of the phone isn't the same as the width of the computer so normally you use % to have no problems with multiple devices