Jump to content

Font sizes


popcorn

Recommended Posts

At Ingolme's advice, I have switched to relative sizes with good success. Percentages or ems. I'm sticking to ems, and not just for text, but also for most things that contain text.One reason is simple: You want to make all browsers scale things correctly when the user increases the viewing size using browser controls. Sticking with pixels can hinder this because some browsers assume that when you specify a pixel you really mean it. So the text doesn't change size, against the user's wishes.The other reason is slightly more complicated. Say I have a font of a certain pixel size and I put the text in a box of a certain pixel size. From browser to browser, I can't be sure it will all fit correctly. If I decide to change the font or font size, I may have to change my box size, too. And if my user increases the font size, but my box doesn't grow, the result will look bad. BUT if I size the font and the box using ems, than any changes I make will stay consistent with each other. The box will grow or shrink as the text grows or shrinks.Obviously, that's not what you always want, so you switch to a pixel measurement when you need to.

Link to comment
Share on other sites

Whats the best type of font size thing to use? px, %, em, etc.. and why
It always depends on what you want to do. If you have something you don't want to change in size, hard code the size. If you want the page to expand under more of your control, use a relative (%, em) size. I use fixed sizes when the container is fixed (like a logo). I use relative sizes for everything else, usually em.
Link to comment
Share on other sites

... I use fixed sizes when the container is fixed (like a logo).
I'd use an image.The 'best practice' would be to use ems for fonts, reasons already explained by Deirdre's Dad. However, Jerry62704's methodology makes a lot of sense too, but to make decisions like those you need some experience so you could determine before implementation what font units you'd be using where.So, I suggest you stick with ems first, you'll do the correct thing from the beginning. And when you're a little more experienced then you can incorporate Jerry62704's advice.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...