Discuss: Power To The People: Relative Font Sizes
by Bojan Mihelac
- Editorial Comments
12 How odd..
This article is published like 3 days after I created my own version.
I can’t say I like it. We should only worry about older browsers. W3C DOM browsers should have a feature like the one on the wired news site: change font size through DHTML. Take a look at my site (http://geocities.com/dc_sfhe) or wired.com/news and you’ll see what I mean.
I love the idea, but I don’t like how it’s done.
posted at 11:20 am on April 9, 2004 by Dante-Cubed
13 Ways to improve on this idea
Dante Cubed has the right idea. Allow the user to carry on enlarging the text as large as they like. The example page in this article stops after a certain size.
Another way to improve on the idea is to change the buttons when the font has reached its largest or smallest size. Make them inactive, so the user knows not to waste time clicking on them again and again in a frustrated attempt to enlarge the text even more.
Note that pixel fonts may also be used in this scenario. The W3C declares them as “relative” units, believe it or not, so they are perfectly acceptable to use. It is only IE on Windows that stops people resizing fonts set in pixels. In which case, a style switcher is essential. But otherwise, just let the user resize the text themselves merely by using the browser’s built-in controls. Then no extra code at all is needed.
posted at 02:41 pm on April 9, 2004 by Chris Hester
14 @ Ray
That message was related to the one directly above it, in which the quotes and apostrophes got screwed up, not to implementation of the technique itself :)
posted at 05:02 pm on April 9, 2004 by Jarek Piórkowski
15 Nice, but missing the point somewhat.
All we did here was replicate a functionality that a good browser should have. It does not really help accessibility, if I have to do that for every page of the site. Therefor, a solution that stores the settings makes a lot more sense. I am some testing shy from releasing a PHP script that allows resizing of the font, colours and page layout, and stores the result in a cookie, which helps a lot more. Watch this space. I got the idea after reading Joe Clark’s article on the subject:
http://www.naarvoren.nl/artikel/high_accessibility.html
posted at 06:19 pm on April 9, 2004 by Chris
16 4 buttons
My font changing system on my site has 4 buttons:
1. Enlarge Text
2. Reduce Text Size
3. Make text darker (originally it’s a shade of green)
4. Return to default text
I give the font size as 13px. Since almost all my visitors use Internet Explorer, they can resize text as they wish. And if they want the original text back, it’s there with the click of a button.
The script is like this:
var fontsize = 13;
function bigText() {
fontsize++;
document.getElementById(“content”).style.fontSize=fontsize+“px”;
}
And they buttons themselves are only available in W3C DOM Capable browsers.
posted at 06:39 pm on April 9, 2004 by Dante-Cubed
17 Thanks
Great article, not sure what to say other then thanks. Not sure if I will implement this in to my design. But its really neat and I could Imagen it coming in handy in the future.
posted at 07:55 pm on April 9, 2004 by Denny
18 One Reason to Limit Text Sizes
One reason I can think of to limit text sizes (as opposed to increasing ad infinitum) is that the layout might become unusable at a certain point. Certainly it would become less appealing.
I realize that some disabled users might want enormous, screen-size text; they should probably be using a screen reader or text-enlarging software. Just a thought.
posted at 08:20 pm on April 9, 2004 by Allan W.
19 @Jarek
Aaah … it all makes sense now.
http://www.alistapart.com/discuss/relafont/#c7558
http://www.alistapart.com/discuss/relafont/#c7564
8 )
posted at 08:40 pm on April 9, 2004 by Ray
20 Also good for 'themes'
if you want to have a fun site that lets you change colors, sort of like the old ipod site.
posted at 12:17 am on April 10, 2004 by Jeremy LaCivita
Discussion Closed
New comments are not being accepted, but you are welcome to explore what people said before we closed the door.
Got something to say?
Discuss this article. We reserve the right to delete flames, trolls, and wood nymphs.
Create a new account or sign in below if you’d like to leave a comment.
Subscribe to this article's comments: RSS (what’s this?)






11 Fumble Clucks
Drats! That link didn’t work the way I wanted it too.
posted at 10:28 am on April 9, 2004 by Ray