Can i make HTML Layout in pixel first then convert everything what ever needed in em
later? is there ant tool or method to do this?
views:
23answers:
2
A:
That would be quite difficult since px
is an absolute unit while em
is a relative unit.
Consider this markup for example:
<div style="font-size:20px;">
<p style="font-size:10px;">The quick brown foxed jumped over
the lazy dog<span style="font-size:30px">s</span></p>
</div>
The (approximate) em
equivalent would be:
<div style="font-size:20px;">
<p style="font-size:0.5em;">The quick brown foxed jumped over
the lazy dog<span style="font-size:3em;">s</span></p>
</div>
Which may not be immediately obvious.
Joel Potter
2010-04-29 01:04:36
@Joel Potter - yes but can't we convert later?
metal-gear-solid
2010-04-29 01:05:28
@metal-gear-solid. It's better to pick one and stick with it. The example I gave uses font-size, but it gets even hairier with dimensions (margin, padding, etc.).
Joel Potter
2010-04-29 01:09:50
A:
You "can" but it would be a painful and imperfect task.
Everything would shift slightly. It would take a long time to realign, resize, and reposition everything on your site.
Christopher Altman
2010-04-29 02:45:45