Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Pixels, ems or percentages - which do you choose / why?
Old 07-29-2009, 09:02 AM Pixels, ems or percentages - which do you choose / why?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,182
Trades: 0
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?
TWD is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-29-2009, 12:50 PM Re: Pixels, ems or percentages - which do you choose / why?
Super Moderator

Posts: 1,584
Location: Kokkola, Finland
Trades: 1
unfortunately some people are stuck with or continue to use ie6
davemies is offline
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 07-29-2009, 01:09 PM Re: Pixels, ems or percentages - which do you choose / why?
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
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..
stevej is offline
Reply With Quote
View Public Profile
 
Old 07-29-2009, 04:37 PM Re: Pixels, ems or percentages - which do you choose / why?
Junior Talker

Posts: 2
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
carrie23 is offline
Reply With Quote
View Public Profile
 
Old 07-29-2009, 06:00 PM Re: Pixels, ems or percentages - which do you choose / why?
angele803's Avatar
Perfectly Imperfect

Posts: 1,772
Name: Stephanie
Location: Oklahoma
Trades: 2
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/
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 07-29-2009, 08:56 PM Re: Pixels, ems or percentages - which do you choose / why?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,182
Trades: 0
Quote:
Originally Posted by angele803 View Post
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.
TWD is online now
Reply With Quote
View Public Profile
 
Old 08-02-2009, 09:58 PM Re: Pixels, ems or percentages - which do you choose / why?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,182
Trades: 0
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?
TWD is online now
Reply With Quote
View Public Profile
 
Old 06-09-2010, 01:41 PM Re: Pixels, ems or percentages - which do you choose / why?
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
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?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 06-09-2010, 08:50 PM Re: Pixels, ems or percentages - which do you choose / why?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,182
Trades: 0
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
TWD is online now
Reply With Quote
View Public Profile
 
Old 06-09-2010, 09:10 PM Re: Pixels, ems or percentages - which do you choose / why?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
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

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-09-2010, 09:49 PM Re: Pixels, ems or percentages - which do you choose / why?
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
Quote:
Originally Posted by TWD View Post
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.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Last edited by TripleMoons; 06-09-2010 at 09:51 PM..
TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 06-10-2010, 04:08 AM Re: Pixels, ems or percentages - which do you choose / why?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
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..
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-11-2010, 08:51 AM Re: Pixels, ems or percentages - which do you choose / why?
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
Quote:
Originally Posted by LadynRed View Post
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?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 06-11-2010, 09:04 AM Re: Pixels, ems or percentages - which do you choose / why?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-11-2010, 09:10 AM Re: Pixels, ems or percentages - which do you choose / why?
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
How could I check that?

Are you seeing the teeny-tiny fonts? http://firmcontour.com/TRIPLEMOONS/
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 06-11-2010, 09:23 AM Re: Pixels, ems or percentages - which do you choose / why?
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
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?
Attached Images
File Type: jpg modtalk.jpg (88.9 KB, 2 views)
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 06-11-2010, 09:57 AM Re: Pixels, ems or percentages - which do you choose / why?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-11-2010, 09:57 AM Re: Pixels, ems or percentages - which do you choose / why?
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
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?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 06-11-2010, 09:58 AM Re: Pixels, ems or percentages - which do you choose / why?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
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

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-11-2010, 10:00 AM Re: Pixels, ems or percentages - which do you choose / why?
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
Chris, I'm on a Mac so I need exact instructions to walk her through. Where is Content > Advanced located on a Microsoft machine?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Reply     « Reply to Pixels, ems or percentages - which do you choose / why?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.79692 seconds with 13 queries