Hi Alastair, On 6/14/06, Alastair Campbell <[EMAIL PROTECTED]> wrote: > Hi Bernat, > > Bernat Lleonart wrote: > > I am creating a layout based in em's.... the box > > is 100px wide in FF, but it is 99px wide in IE. > > Only 1px difference? I'd expect that much from using percentages to do > the page width! That could easily be rounding error. > > Felix might chip in that you shouldn't apply the sizing to the main font > declaration: > http://archivist.incutio.com/viewlist/css-discuss/73749 > > I haven't made my mind up about that yet, I've a lot of reading and > testing to do first. > > Layouts based on em's are not often a good idea, unless you can set a > max-width on them (including IE if your user based includes that). > http://archivist.incutio.com/viewlistcss-discuss/74715 > > This *might* not apply to your page/site/experiment, but with no URL to > see or motive given... > > Kind regards, > > -Alastair >
I have found that, as you said, it might be a rounding error, the problem comes from the text-size declaration in the body. I have tried setting it to 100%, and then, in order to have a 100px wide box, I do this: body { font-size: 100%; } #box { font-size: 1em; width: 6.25em; /* 100/16 */ background: gray; } That works correctly in both browsers. Thanks for the url's, I'll take a look at them. Bernat ______________________________________________________________________ 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/