+ 1
what is difference bt PX and %
4 Respuestas
+ 8
Pixels are fixed-size units that are used in screen media. One pixel is equal to one dot on the computer screen
The percent unit is much like the “em” unit i.e telativr to your current size weight or value
Take for example
in< hr/>
hr width=50% means 50% of the screen
while
hr width=50px is exactily 50dots on your screen
+ 5
no % is some percent of screen like if width = t% then t=% of the total width will be occupied while 5 px is measured in pixels ,which vary from device to device a tablet can have more pixel than pc
+ 2
Pixel (px) and percentage (%) are two different things. Pixel is a type of measurement while percentage we can say that is ratio of some measurement. Let's take a look for the explanation below.
Let's say we have a screen of 2000 pixels width and 1000 pixels height. We need to display a line with left alignment. The example is width=50px and width=50%.
1. width=50px will make the line appear very short of the left side of screen because the total width is 2000 pixels.
2. width=50% will make the line appear from the most left side until the center of screen. It is because 50% is a half.
Hope this can help you.
+ 1
px is for the pixels i.e,30px,50px,80px.It depends upon your screen resulation while % is the n% part of your screen to be infected .