+ 1
What's the difference between 'px' and '%' while setting the width in an attribute?
attribute specifications
5 Answers
+ 10
Main difference is that % helps u to create a responsive web design. If u set the div width in % that proportions will be the same when screen resolution will be changes
+ 8
Yep) if u using px thats a static equal size on differerent resolutions
+ 7
no) u may used px but I rated used px for vertical sizes
+ 1
does it mean that the width as pixel will not be changed with screen resolution?
+ 1
width: 10% mean that the element has 10% of the width of it's parent node, 10px are 10px, I think this is obviousđ