I'm creating an HTML/CSS site and I have the font size adjusted the way I want it when I look at the site on Firefox in Windows (which is what I'm developing on). But when I look at the site in OS X (either Safari or FF), the font size is too big. Not massively bigger, but bigger than my client wants. But if I reduce the font any more, it's going to be too small for Windows machines.

I'm specifying all font sizes in ems in my CSS doc.

I realize that different browsers and platforms render things differently, and there's no way to control exactly how the page will look. But this seems like a pretty big issue and I'm wondering if there is some simple solution that I should know about. And if not, what is the complicated solution?

Thanks in advance.

  • can we see the url? a lot depends on how you've set it up and what font stack you're using. Tony Crockford almost 10 years ago
  • Sure, it's here (in progress): http://greenpenqa.com/apples/about.html johnnyb10 almost 10 years ago

2 answers

This was chosen as the best answer

It looks to me like the font-stack you've chosen is the issue. Calibri is quite a small font compared to Arial and Verdana and Calibri is unlikely to be available on OS X machines.

You probably need to play around with different font stacks some more or maybe try font-size-adjust.





For comparison, I installed Calibri on my Mac and took a screen grab of the first three fonts in your stack:


as you can see substituting Arial when Calibri isn't available will make quite a size difference.

Answered almost 10 years ago by Tony Crockford
  • Wow, thank you! Extremely helpful... johnnyb10 almost 10 years ago

I assume the following is your problem:

Em is a relative measurement, and your baseline font size is probably different for each browser your testing. Try setting a default font size in px for your body and/or html declarations, so that all your relative sizes (ems) will have a consistent baseline measurement.

Answered almost 10 years ago by Dwayne Anderson