Old 20-02-2008, 09:20   #1 (permalink)
88mph
Great Scott!!
 
88mph's Avatar
 
Join Date: Feb 2008
Posts: 223
em or px?

just found this:

http://riddle.pl/emcalc/

and was considering turning all my pixel measurements to em's, do you think this is a good idea?
  Reply With Quote
Old 20-02-2008, 09:23   #2 (permalink)
d*d
Senior Member
 
d*d's Avatar
 
Join Date: Oct 2004
Location: Bristol
Posts: 3,155
yup

If you set your font-size to 62.5%, then the ratio is easier to work with as 1 em = 10px
  Reply With Quote
Old 20-02-2008, 09:26   #3 (permalink)
djeglin
goober :-)
 
djeglin's Avatar
 
Join Date: Dec 2006
Location: Birmingham, UK
Posts: 525
Send a message via MSN to djeglin
Don't set your font size to 62.5% - Setting your body font size by percentage is good, but set it to 100% or more. Anything less than 100% triggers inconsistencies in IEs rendering of larger and smaller font sizes.
__________________
My signature sucks.
  Reply With Quote
Old 20-02-2008, 09:26   #4 (permalink)
88mph
Great Scott!!
 
88mph's Avatar
 
Join Date: Feb 2008
Posts: 223
good to know before i hack at all this code
  Reply With Quote
Old 20-02-2008, 09:28   #5 (permalink)
88mph
Great Scott!!
 
88mph's Avatar
 
Join Date: Feb 2008
Posts: 223
Quote:
Originally Posted by djeglin
Don't set your font size to 62.5% - Setting your body font size by percentage is good, but set it to 100% or more. Anything less than 100% triggers inconsistencies in IEs rendering of larger and smaller font sizes.

do you mean in my code? or in my browser? I was just going to use the em calc to work out all the measurements for my whole site, so it should dynamically shift for extra usability
  Reply With Quote
Old 20-02-2008, 09:34   #6 (permalink)
roo
Scatterbrained.
 
roo's Avatar
 
Join Date: Oct 2007
Location: South Wales, UK
Posts: 224
I did the 100.01% thing on the body then used ems
  Reply With Quote
Old 20-02-2008, 09:34   #7 (permalink)
d*d
Senior Member
 
d*d's Avatar
 
Join Date: Oct 2004
Location: Bristol
Posts: 3,155
Quote:
Originally Posted by djeglin
Don't set your font size to 62.5% - Setting your body font size by percentage is good, but set it to 100% or more. Anything less than 100% triggers inconsistencies in IEs rendering of larger and smaller font sizes.

Not heard of that before
  Reply With Quote
Old 20-02-2008, 09:34   #8 (permalink)
djeglin
goober :-)
 
djeglin's Avatar
 
Join Date: Dec 2006
Location: Birmingham, UK
Posts: 525
Send a message via MSN to djeglin
What i mean is, use a percentage to set your base font size for your body tag. IE body { font-size: 100%; }, then use ems to set your font sizes in your content ( p.someclass { font-size: 0.75 em; } ).

Its good to set a base font size for your body tag. This helps to keep things consistent across browsers, but setting that size to less than 100% makes IE6 scale fonts irregularly when people change their font size in their browser (IE, to larger, largest, smaller, smallest). Using 100% or higher keeps these changes consistent across browsers.
__________________
My signature sucks.
  Reply With Quote
Old 20-02-2008, 09:35   #9 (permalink)
djeglin
goober :-)
 
djeglin's Avatar
 
Join Date: Dec 2006
Location: Birmingham, UK
Posts: 525
Send a message via MSN to djeglin
Quote:
Originally Posted by d*d
Not heard of that before

I read about it a while ago, and then we had a woman in here to talk to us yesterday from the RNIB about all this stuff, and she said it as well. Its one of those little things that is worth knowing.
__________________
My signature sucks.
  Reply With Quote
Old 20-02-2008, 09:43   #10 (permalink)
88mph
Great Scott!!
 
88mph's Avatar
 
Join Date: Feb 2008
Posts: 223
Quote:
Originally Posted by roo
I did the 100.01% thing on the body then used ems

why 100.01%?
  Reply With Quote
Old 20-02-2008, 09:43   #11 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,273
i've not heard that one either .. and can't say i've noticed it do anything to IE ...

does anyone know why Opera 9 displays all my text as abnormally HUGE ?
is that related to 62.5% at all ?
__________________
fuck signatures
  Reply With Quote
Old 20-02-2008, 09:46   #12 (permalink)
88mph
Great Scott!!
 
88mph's Avatar
 
Join Date: Feb 2008
Posts: 223
just to clarify, my original post was not just about font size's, i was thinking of making ALL measurements em's, so that when the font gets bigger, the rest of the site grows with it, is this considered good practice?
  Reply With Quote
Old 20-02-2008, 09:47   #13 (permalink)
d*d
Senior Member
 
d*d's Avatar
 
Join Date: Oct 2004
Location: Bristol
Posts: 3,155
Quote:
Originally Posted by 88mph
just to clarify, my original post was not just about font size's, i was thinking of making ALL measurements em's, so that when the font gets bigger, the rest of the site grows with it, is this considered good practice?

No, images will look awful
  Reply With Quote
Old 20-02-2008, 09:50   #14 (permalink)
88mph
Great Scott!!
 
88mph's Avatar
 
Join Date: Feb 2008
Posts: 223
Quote:
Originally Posted by d*d
No, images will look awful

so keep the structure solid (unless using a liquid design) would be your advice?
  Reply With Quote
Old 20-02-2008, 10:00   #15 (permalink)
d*d
Senior Member
 
d*d's Avatar
 
Join Date: Oct 2004
Location: Bristol
Posts: 3,155
Quote:
Originally Posted by 88mph
so keep the structure solid (unless using a liquid design) would be your advice?

yes, but allow for the textsize increase
  Reply With Quote
Old 20-02-2008, 10:02   #16 (permalink)
haku
shiro
 
haku's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,192
set everything in ems except your images. Images need to be a static size or they get all weird. But everything else flows better if its in ems.
  Reply With Quote
Old 20-02-2008, 10:06   #17 (permalink)
88mph
Great Scott!!
 
88mph's Avatar
 
Join Date: Feb 2008
Posts: 223
surely if i stay true to the images dimensions, it'd be fine?
  Reply With Quote
Old 20-02-2008, 10:18   #18 (permalink)
pgo
i'm done, son
 
Join Date: Jan 2005
Posts: 12,262
Well, they're bitmaps, not vector, so they will look bad when resized.
  Reply With Quote
Old 20-02-2008, 10:23   #19 (permalink)
88mph
Great Scott!!
 
88mph's Avatar
 
Join Date: Feb 2008
Posts: 223
Quote:
Originally Posted by pgo
Well, they're bitmaps, not vector, so they will look bad when resized.

i suppose, but this is for people with poor eyesight??
  Reply With Quote
Old 20-02-2008, 10:53   #20 (permalink)
Cascade
Registered User
 
Join Date: Feb 2008
Posts: 4
not always, people on hi-res screen may use it too

also the base size is 1em = 16px, you can see the calculator on riddle.pl set this as default
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8