0

I need to determine what a browser's default font size is, as I'm using em's in my layout, but am using quite a bit of javascript as well.

The problem is, Safari 5's default font-size seems to be independent of the em width in an unpredictable way.

So, when Safari's default font size is set to 14px, it reports a 1em div as being 16px. However, it uses the 14px value when calculating media queries. So a media query that's set for 20em will actually kick in at 280px, not 320px. This is problematic because in javascript, I have to supply an actual pixel value.

Why does Safari report a 1em div as being 16px wide, regardless of what the default font size is set to? Why isn't this value consistent with ems in media queries?

4

0 に答える 0