Micky Hulse wrote:
> <http://riddle.pl/emcalc/>
>
> Looks like a great tool to help one create an EM-based layout...
Yes, it is. OTOH: any calculator will do :-)
> I have been wanting to make the move to EM's for layout, but I do not
> see EM layouts being practical when it comes to layouts that are
> needing pixel precision (some clients want that)... For example, a
> width of 700px for a child of the body converts to 43.75em. How do
> most browsers treat that number? Just speculating, but I would
> imagine that some browsers round to the nearest whole number.
Some round up and some round down, and some won't round at all. Some
even dump all the em-decimals while they're at it. It even depends on
how large an em-value you serve them.
I wouldn't use em if one of the requirements is "pixel-precision" down
to the last pixel. That's what pixel, and all those box model hacks, are
for.
> What is the actual math to do the PX > EM conversion?
Pixel-width divided by (relevant) font-size in pixels = EM.
So, if (relevant) font-size is 16px and width is 700px, then you have:
700/16=43.75.
Now, change font-size and recalculate...
regards
Georg
--
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/