|
Pixels, ems or percentages - which do you choose / why?
07-29-2009, 09:02 AM
|
Pixels, ems or percentages - which do you choose / why?
|
Posts: 1,182
|
I can understand the basic logic behind using relative font sizing and all the web design books written up to a few years ago recommend
relative font sizing for scalability as an accessibility measure.
But it now seems that all the modern browsers will resize the entire
window when the user adjusts View Zoom in/ Zoom out or
alternative Ctrl++ Ctrl+-
So is there still a compelling case for using relative font sizings
like ems and percentages.
It might still be a part of the WCAG but it seems like an anachronism.
Any opinions?
Which do you choose and WHY?
|
|
|
|
07-29-2009, 12:50 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 1,584
Location: Kokkola, Finland
|
unfortunately some people are stuck with or continue to use ie6 
|
|
|
|
07-29-2009, 01:09 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 996
Location: Not positive
|
When I was first introduced to CSS and I started learning it, the first method I saw for font-size was to use pixels. And of course, since I was a beginner, that habit stuck. And I still think that it's the best method when it comes to font sizing (seeing that it's so precise). Though because of the browsers that are not 'modern' as you defined them, I have to remember to use relative sizing. For browsers like... IE6.
Now when most people hear that, they just say, 'Who cares? IE6 is old stuff! It's the user's fault if they use it'. Normally I'd say that too, except for one thing: It's the second most used browser. IE7 is number one, if that makes you feel any better.
So for now, I'm using relative sizing.
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
Last edited by stevej; 07-29-2009 at 01:10 PM..
|
|
|
|
07-29-2009, 04:37 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 2
|
I use percentages most of the time due to the same issue of not everyone viewing your site in the same way. For different window sizes, different browsers, and zooming, percentages just work out better.
|
|
|
|
07-29-2009, 06:00 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 1,772
Name: Stephanie
Location: Oklahoma
|
I used to use pixels, then I started using percentages, then, recently, I learned about a different technique that I think is pretty cool. If you set your body font size to 62.5%, you can use ems to size the rest of your elements just like you would with pixels. For example, if you wanted something to be 14px, you would use 1.4em instead. Even though the new browsers are zooming and scaling the entire site (which I am so happy about), I think I will keep using this technique for a while. It's easy and flexible for older browsers.
Here is a blog post that elaborates: http://www.clagnut.com/blog/348/
|
|
|
|
07-29-2009, 08:56 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 1,182
|
Quote:
Originally Posted by angele803
I used to use pixels, then I started using percentages, then, recently, I learned about a different technique that I think is pretty cool. If you set your body font size to 62.5%, you can use ems to size the rest of your elements just like you would with pixels. For example, if you wanted something to be 14px, you would use 1.4em instead. Even though the new browsers are zooming and scaling the entire site (which I am so happy about), I think I will keep using this technique for a while. It's easy and flexible for older browsers.
Here is a blog post that elaborates: http://www.clagnut.com/blog/348/
|
Yep. Richard Rutter from ClearLeft introduced that technique.
Its a good one.
To be honest if you look at the latest browser stats, IE6 seems
to be dying faster. Lets all raise a glass when that happens.
A problem for people who deal with CMS system is that out of the box most themes are in pixels so it can be a bit of work to convert to relative sizing.
|
|
|
|
08-02-2009, 09:58 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 1,182
|
So can we conclude that relative sizing is only really necessary
to prop up IE6?
10 years from now we can all just code in pixel settings?
|
|
|
|
06-09-2010, 01:41 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
|
Sorry to bump an old thread, but...
I've switched to using precentages for a while now...and I've tried explaining the concept to clients as to why it might look slightly different browser to browser, screen resolution to screen resolution...But I'm really confused on this one...
http://firmcontour.com/TRIPLEMOONS/
The client is seeing this:
liz-screenshot.jpg
I'm seeing (as is NetRenderer and a friend of mine):
my-screenshot.jpg
What could possibly be going on that her fonts are shrunken down like that?
Should I just kick the percentages and revert to fixed?
|
|
|
|
06-09-2010, 08:50 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 1,182
|
The first example looks like its in Firefox.
The second looks like Safari.
I would start by you and your client doing an apples to apples comparison using the same browser.
Different rendering engines might treat percentages differently.
So perhaps hardline standardistas might disagree but i think pixels
gives a more consistent result.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals" Please login or register to view this content. Registration is FREE
|
|
|
|
06-09-2010, 09:10 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 10,017
Location: Tennessee
|
Percentages can be tricky. I prefer to use em instead, less problems and better for liquid/fluid layouts.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
|
|
|
|
06-09-2010, 09:49 PM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
|
Quote:
Originally Posted by TWD
The first example looks like its in Firefox.
The second looks like Safari.
|
Incorrect. Both are FireFox. Mac vs Microsoft. However, a friend of mine on a Microsoft machine looked on FireFox and IE7 and they look identical to my FireFox (Mac). Running the website through NetRenderer also shows the fonts identical to mine. So, something has got to be wrong with her browser, correct?
Quote:
|
Originally Posted by LadynRed
Percentages can be tricky. I prefer to use em instead, less problems and better for liquid/fluid layouts.
|
I'll look into that. I'm unfamiliar with em usage.
Last edited by TripleMoons; 06-09-2010 at 09:51 PM..
|
|
|
|
06-10-2010, 04:08 AM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
|
I set the global fontsize to .68em then use % from there unless a specific design specific size is needed.
Using EM's are good for accessibility as is %?
Bere in mind now that IE6 isnt really of any concern to anyone unless the site HAS to cater for it, i.e. goverment/council sites.
__________________
Please login or register to view this content. Registration is FREE
Learn professional skills from professional people, from $6.50 a month.
Last edited by Phunk Rabbit; 06-10-2010 at 04:20 AM..
|
|
|
|
06-11-2010, 08:51 AM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
|
Quote:
Originally Posted by LadynRed
Percentages can be tricky. I prefer to use em instead, less problems and better for liquid/fluid layouts.
|
So I did this and she still sees the fonts teeny-tiny. Is their some setting on her computer that needs fixed?
|
|
|
|
06-11-2010, 09:04 AM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
|
Is it all pages or just yours?
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
06-11-2010, 09:10 AM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
|
How could I check that?
Are you seeing the teeny-tiny fonts? http://firmcontour.com/TRIPLEMOONS/
|
|
|
|
06-11-2010, 09:23 AM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
|
So I used your website Chris, since I noticed it used ems...No huge differences between hers and mine (mine is on the bottom). So what they heck is wrong with this FirmContour site?
|
|
|
|
06-11-2010, 09:57 AM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
|
Have the font settings been changed in Firefox options? There is a checkbox to force user selected sizes rather than the page styles. (Content -> Advanced)
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
06-11-2010, 09:57 AM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
|
Update!
It's her FireFox that is causing the problem? I had her reset FireFox's view to 100% and it still looks wonky. Her IE8 is fine?
|
|
|
|
06-11-2010, 09:58 AM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 10,017
Location: Tennessee
|
I suspect it has more to do with the differences in browsers than anything that's actually 'wrong'. None of the browsers render text EXACTLY the same, and there is a marked difference between Windows and Mac.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
|
|
|
|
06-11-2010, 10:00 AM
|
Re: Pixels, ems or percentages - which do you choose / why?
|
Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
|
Chris, I'm on a Mac so I need exact instructions to walk her through. Where is Content > Advanced located on a Microsoft machine?
|
|
|
|
|
« Reply to Pixels, ems or percentages - which do you choose / why?
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|