skelleex — 2011-09-17T08:34:13-04:00 — #1
When designing by mobile page for should I use percentages and relative code instead of absolute measurements to cater for all
oddz — 2011-09-17T18:37:56-04:00 — #2
In most cases you should always be using relative measurements. Not only in terms of mobile targeting but desktop as well. That creates a design that is much more likely to adapt to different user preferences and devices retaining its over all look and feel.
skelleex — 2011-09-17T21:10:52-04:00 — #3
Excellent that means i am on the write track however my heights are in px i will have to set them to %. What about fonts size are there any recommended range of ems it should be?
oddz — 2011-09-17T21:36:23-04:00 — #4
The default font size is 1em, which could be anything but generally speaking its around 14 – 18px. In most cases its about 16px. So if you would like to have an outer wrapper that is ~960px you would use 960/16 which yields 60em.
ralphm — 2011-09-17T22:49:30-04:00 — #5
That won't work, as %height is a misleading concept*. Ideally, avoid setting heights on anything (except in special circumstances) as it is just a recipe for trouble. Better to let elements set their own heights in most cases.
* Somewhere along the line you have to set a height in a fixed measurement to allow %height on inner elements to mean anything.