Reputation: 739
Right now there is a debate in the company that I work, if we should specify the dimension of our templates (divs, fonts etc) based on the pixel ratio of the devices (computers, smartphones etc.) or just simple pixels.
What do you think about specifying the width/height of the divs based on pixel ratio instead of old school simple pixels? And what's the best practice for sizing based on pixel ratio?
Thanks!
Upvotes: 4
Views: 113
Reputation: 2767
Percentages are ideal if you are creating a site that adapts to mobile.
Percentages are good for designing based on adapting to screen sizes, because the page is then divided according to how specify the width. However, it is much harder to position elements exactly how you want them with percentages and that is where pixels are more useful.
Pixels are good for exact positioning of elements but they don't scale like percentage, so this will cause page 'cut-offs' when viewed in smaller window size.
Here are a few links that compare the 2:
http://kyleschaeffer.com/user-experience/css-font-size-em-vs-px-vs-pt-vs/
http://webdesign.about.com/cs/typemeasurements/a/aa042803a.htm
Upvotes: 0