On Apr 19, 2014, at 8:27 AM, Tim Dawson <t...@ramasaig.com> wrote: > Changing the media query limits to ems at the rate of 1em = 16 pixels worked > well. > Likewise for <div> widths and anywhere with default text size. > > But widths, margins (in fact any dimension you care to name) went haywire in > headings <h?> with a different font-size. All my font-sizes are percentages. > Obviously the em value has to be reduced as the font-size increases, to get > the same pixel equivalent. > > I'm tempted to leave margins, padding etc. in headings as pixels and just > change them in the media query if they become unworkable. Particularly when > it comes to small spaces (1-10 pixels, say) it seems very fiddly to deal with > several decimal places of ems (which probably convert to sub-pixel > dimensions). > > What do others do ?
I use ems for everything. I find: 1. Browsers handle "several significant decimal places" without any noticeable problem. 2. Headings <h?> using ems present extremely well without any noticeable problem. <I don't understand your statement "Obviously the em value has to be reduced as the font-size increases, to get the same pixel equivalent."> 3. ALL measurements, including margins and paddings, work well without any noticeable problems. The *only* problems I have ever encountered has been mixing measurement types. My advise, pick something and stay with it. 4. Lastly, use ems for images as well. That way your entire site scales well with zooms. Here's my write-up on it: http://sperling.com/examples/zoom/ HTH's tedd _______________ tedd sperling t...@sperling.com ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/