% or em or px or what?
- Started
- Last post
- 12 Responses
- Dancer
I never know which one to use. What would you say is best and why?
Font sizes in particular
- OBBTKN0
I normally use ems for font sizes, mainly for accesible sites.
And px and % depending for what, but for formating tables or divs...
- digilee0
For online work, I only use % as it seems to work for me simply because it's easier for me to work out.
- weestu0
i use ems for fonts and line-heights, px for fixed width sites and % for fluid...
- Dancer0
I tried to do fonts in em's but my client was seeing the text larger than I. She did have it set to "medium" for her settings
- weestu0
are you on a mac or pc?
- emecks0
medium is the default size in IE I think..
But yeah ems are probably best for fonts :)
- Dancer0
useful weestu. I'm on a Mac and when em's are viewed they are larger on a PC (25% as stated in your link)
So what size (in ems) do you guys usually go for in body copy
- abba_cadaver0
Do it in px. You will know where everyone starts. If they want larger text I know ie 7 and firefox allow you to resize from px.
- bliznutty0
always do fonts in px
generally do layout in % as it gives more dynamicness to the presentation layer, of course there will be exceptions to this when fixed sizes are needed.
- nocomply0
IE 7 does not resize fonts specified in px
http://www.456bereastreet.com/ar…
I use ems when possible because they will be scale-able in the widest array of browsers.
That's an old article that got me started. You'll need to read the comments section for a little fix to get it to work in Safari.
http://www.designedbyevan.com/fo…
That is an example of my own little css default style sheet i set up to handle font sizing with ems. Feel free to steal it and use it, and tell me if I'm wrong about it. I made it around a year ago so things may have changed some.
- gabriel20
I can tell you IE7 definitely does resize fonts specified in px. It will enlarge the entire page now, graphics included.