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
Old 12-30-2008, 07:05 PM Text Size Changes
Truly's Avatar
Ultra Talker

Posts: 321
Trades: 0
I am struggling with text size changes in IE, having to consider that in layout designs is a real pain.

I have seen sites with EM widths that adjust as text size changes, I have see some with percentages that change, I have seen others that somehow dont change the text size at all.

I am all for accessibility, but doesnt zoom make more sense since it doesnt distort the layout? And if so, how do you stop your page from resizing with text size changes?
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-30-2008, 07:11 PM Re: Text Size Changes
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Well, how do you set the size of your text? If you set this size using the "em" attribute, then yes, it will normally resize. Normally, I use the "px" attribute. For example:
Code:
font-size: 12px;
That always works for me. And if you don't set a size for the text at all, then it will revert to the default size.

Tell me if it works!
- Steve
stevej is offline
Reply With Quote
View Public Profile
 
Old 12-30-2008, 08:56 PM Re: Text Size Changes
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I tend to size everything in ems, so that the elements expand at the same rate as the text.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-31-2008, 12:09 AM Re: Text Size Changes
Truly's Avatar
Ultra Talker

Posts: 321
Trades: 0
Thanks for both of the answers. Stevej, your solution worked well. By setting font size equal to 12px in the body declaration it stops resizing of the text. This does not stop <h1> et al from resizing but that doesnt change the general layout much.

I see this as a temporary solution so that I can get the site up but I think in the long run I will work on switching over to a em based layout as christhirst suggested so that it is more accesible.

Thanks again for the advice.
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
Old 12-31-2008, 11:58 AM Re: Text Size Changes
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Setting font sizes using PX means that users of IE6 (and there are still LOTS of them) will not be able to resize the text to suit their needs.

The better way is to set the font size on <body> to 100.1% (takes care of rounding errors), then define the text sizes in em's or percentages. In general, the default text size is 16px, do the math for the smaller sizes. 12/16=75% or .75em.

In order to keep text sizing from breaking your layout, you'll have to uses percentages or ems for ALL of the widths in your layout - not pixels.
__________________
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 01-01-2009, 05:18 PM Re: Text Size Changes
Truly's Avatar
Ultra Talker

Posts: 321
Trades: 0
Yes thats definetly on my to-do list. Here is a useful site I found to help out anyone else who is thinking of making the switch as well: http://pxtoem.com/

It converts px to em.

I guess its incorrect practice but since I started thinking about switching to an em based layout I have noticed that the majority of sites really limit the ability to resize text. Obviously this has the advantage of making the layout look the same on any text size. FF also doesnt have text resize from what I see but just zooms in, a feature that IE also has, so although im still going to do it, is it that important to let the user adjust the text size? Unless some browsers dont have that ability.

Anyways thats my ramble... thanks again for the help
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
Old 01-02-2009, 12:32 PM Re: Text Size Changes
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
FF most certainly DOES resize text, you just need to use the CTRL_+ or CTRL_- to increase/decrease the font size, but FF will resize text even if it's defined by the designer as px - and layouts like that break badly more often than not.
__________________
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
 
Reply     « Reply to Text Size Changes
 

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.25297 seconds with 12 queries