navwin » Tech Talk » How Do You Spell HTML? » Font Size - fixed or relative?
How Do You Spell HTML?
Post A Reply Post New Topic Font Size - fixed or relative? Go to Previous / Newer Topic Back to Topic List Go to Next / Older Topic
EagleOne
Member Elite
since 2000-03-07
Posts 2829
Between a laugh and a tear...

0 posted 2002-12-23 08:59 PM



Which is the best way to go? Why?

© Copyright 2002 E.T. Meehan - All Rights Reserved
Christopher
Moderator
Member Rara Avis
since 1999-08-02
Posts 8296
Purgatorial Incarceration
1 posted 2002-12-23 10:13 PM


Hopefully Ron will correct me if I'm wrong:

Most browsers have an option for the user to adjust the way a page is presented to them in terms of text size. (View -> Text Size for IE).

Relative would simply adjust the size in relation to their personal settings, making it appear (for example) +1 above their text size.

Fixed, one would assume, would render that option moot, making it so many pixels no matter what they have it set at.

As to which is the best... it just depends on what you wnat to do with it, who's looking at it, and whether it matters or not... as always.

EagleOne
Member Elite
since 2000-03-07
Posts 2829
Between a laugh and a tear...
2 posted 2002-12-23 10:36 PM


Thanks Chris, I’ve been tending to lean towards the relative, but haven’t been overly sure.

I guess the main aim is to make the pages easily viewable to greatest amount of people with the least amount of difficulty. I know that when I visit a page I want to be able to view it comfortably without having to reconfigure my system. I think that holds true of most people.

So in considering that perhaps relative sizes would be the best option.

Ron
Administrator
Member Rara Avis
since 1999-05-19
Posts 8669
Michigan, US
3 posted 2002-12-23 11:00 PM


As Chris suggested, relative fonts sizes are indeed designed to improve accessibility for the visually impaired. And that's a good thing, both for you and for them. I've heard estimates that go as high as eight percent for the number of surfers who suffer from visual impairment. That's a lot of people to arbitrarily ignore.

However, to really answer the question, we need to be more specific. Could we have a little history meandering music, please?

In the beginning there was HTML. A fixed font size ranged from 1 (teeny tiny) to 7 (pretty massive), with 3 being the default if the designer failed to specify a size. We also had relative font sizes, based on the BASEFONT tag. For example, at the top of the page I might say <BASEFONT COLOR="#000080" SIZE=3> and thus set my basefont to the same default size of 3. If I later said <font size=+1> I would essentially be setting it to 4, just as <font size=-1> would set it to 2. The idea behind the basefont was a good one. I could design my page and then quickly change the size of ALL the text by changing just the definition of the basefont. It was a good idea, but no one ever used it.

This page (as with all the pages in the forums) uses HTML's fixed font size. Not relative. Yet, if you go to View/Text in your browser, you should find that you can STILL change your view of the font size. If you're using the font size built into HTML specifications, it really doesn't matter whether your use fixed or relative. The browser can and will adjust either for the visually impaired. This is a good thing!

In the beginning there was HTML and it was good. But, uh, it wasn't good enough. So, some really smart people came up with Cascading Style Sheets (CSS) to give designers greater control. And it TOO has both fixed and relative font size specifications.

Fixed size is what everyone seems to be using. If I set my font size to 11px (pixels), that is exactly what the browser will display. You can change your View/Text settings all day long and you are still going to see eleven pixels. That is NOT a good thing, at least not for the visually impaired. For the anally retentive, I guess it's cool, though.

While the relative font size specifications in CSS are very different from the old 1 to 7 specs in HTML, they are also quite similar in that we have seven different sizes.

xx-small
x-small
small
medium
large
x-large
xx-large

Most browsers (and certainly IE) will display xx-small text as equivalent to 10px and xx-large text as equivalent to 48px. Unlike CSS's fixed font size specifications, however, these CAN be adjusted by the individual user. It gives BACK to the visually impaired the ability to alter the way your web page looks to them. A very good thing.

Obviously, CSS absolute font sizes gives the designer more control. Absolute control, in fact. None of the seven relative font sizes, for example, work out to eleven pixels and if you feel you need eleven pixel text, the only way to get it is with 11px. In my opinion, however, you should have a VERY compelling reason to ever use absolute font sizes. It's not much different than taking out all the handicapped parking spots at your business or removing the ramp at your school.

There are actually a lot of other things to consider when building a web site with accessibility in mind. For those interested, there's a program called Bobby at http://bobby.watchfire.com/bobby/html/en/index.jsp that can be a big help. Enter the URL of your home page (or any page on your web site), and Bobby will read through your HTML and report back what it sees as potential accessibility problems. Unfortunately, in my opinion, Bobby is a little TOO picky and that can make the report hard to read. To really understand what Bobby tells you will require a bit of study, but the report can nonetheless lead you in the right direction. Give it a shot!

Uh, you can turn off that history meandering music now, please …

vlraynes
Member Rara Avis
since 2000-07-25
Posts 8229
Somewhere... out there...
4 posted 2002-12-24 02:11 AM



Very cool stuff to know...I just love learning.

EagleOne
Member Elite
since 2000-03-07
Posts 2829
Between a laugh and a tear...
5 posted 2002-12-31 08:22 PM


Ok, I’ve played around with the code for a bit and I’ve even got to the point where I think Cascading Style Sheets might be ok! Predominately I’m using relative font sizes and I’m relatively happy with the way things have turned out, though I do realise I have some more work to do yet.

My main concern is the obvious difference in displayed font sizes between Netscape and Explorer, particularly with the Navigation bar. In Netscape the fonts appear to be much smaller, why is this so?

<a href="http://users.hunterlink.net.au/~ddetm/">http://users.hunterlink.net.au/~ddetm/</a>


Ron
Administrator
Member Rara Avis
since 1999-05-19
Posts 8669
Michigan, US
6 posted 2002-12-31 09:59 PM


Welcome to the wonderful world of web design. Or this small corner of it? Wait until you see what else is in the room. Different font sizes. Double-spacing in one browser and not another. Form elements that look very, very different. Table cells that seem to disappear. And just wait until the first time you see your carefully crafted design on a Mac.

The specifications for HTML and CSS are purposely vague enough to allow for fairly substantial differences in hardware. That leaves a lot of room for interpretation and the result is variations in virtually all browsers and all operating systems. It seems like a high price to pay, especially when you're trying to get your pages "just" right, but the price is a necessary one if the technology is to be universal.

The answer?

Acceptance, I guess. Try to make your pages look as good as possible in all browsers, ugly in none, functional if not perfect, and realize your control will always be far from absolute. It's the nature of the beast.

Post A Reply Post New Topic ⇧ top of page ⇧ Go to Previous / Newer Topic Back to Topic List Go to Next / Older Topic
All times are ET (US). All dates are in Year-Month-Day format.
navwin » Tech Talk » How Do You Spell HTML? » Font Size - fixed or relative?

Passions in Poetry | pipTalk Home Page | Main Poetry Forums | 100 Best Poems

How to Join | Member's Area / Help | Private Library | Search | Contact Us | Login
Discussion | Tech Talk | Archives | Sanctuary