By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,677 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,677 IT Pros & Developers. It's quick & easy.

Any way to set default text size to medium?

P: n/a
Dear everyone,

Its my understanding that IE6 now uses a default text-size of "Small"
rather than IE5's "Medium".

Since I have used relative font-sizes (usually in ems) on all my
sites, I am now getting reports of "your fonts are too tiny" from
various users. Of course, the sites still look fine if those users set
their text-size to medium, but face it -- most people don't even know
thats an option.

I was willing to sacrifice the users control and specify a base font
size in the body tag (something like 14px), and then convert the rest
of the styles to a percentage. However, I control most of my
formatting by using tables, and have discovered that the font-size
attribute in the body tag doesn't carry into text within tables.

So, is there any way for me to set the default text size to medium?
Or do I need to use Javascript to detect the browser and then load the
appropriate style sheet? Any suggestions would be appreciated.

*** Marti
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
ma***@martigold.com (Marti) wrote:
Its my understanding that IE6 now uses a default text-size of
"Small" rather than IE5's "Medium".
No, it's the other way around. They fixed it, instead of breaking
things - but they managed to _document_ it all wrong at
<http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/properties/fontsize.asp>
which says:
"What's New for Microsoft® Internet Explorer 6
When you use the !DOCTYPE declaration to specify standards-compliant
mode, the default value for this property is small, not medium."

It's just the other way around. The standards-compliant initial value
is medium, not small.

To confuse us further, it's really the interpretation of the keywords
like small and medium that has changed, not the default text size per
se. On IE 6, if you set font-size:medium for some text on an otherwise
unstyled page, it has no effect, which is of course the correct
behavior. In intentionally buggy mode, also called quirks mode, which
emulates IE 5 misbehavior, the text becomes bigger.

There's really a simple cure: Do not use keywords as font-size values
at all. They are, in fact, just a poor and even technically flawed
imitation of the <font> tag with its sizes 1 through 7. And just as the
<font size> values, their real effects are (by definition) browser-
dependent and, what's worse, inconsistently implemented.

Using percentages avoids the problems. By setting, say, font-size:85%
you specify a reasonable, yet noticeable reduction in font size.
Since I have used relative font-sizes (usually in ems) on all my
sites, I am now getting reports of "your fonts are too tiny" from
various users.
So what have you actually set? And what's really going on?

Are you saying that the "factory settings" of IE 6 have now changed so
that the default size - to be used when no style sheet sets any
font-size - is smaller than it used to be. That would be a bad move,
but I don't think they did it. If they did it, the only sensible thing
to do is that users change the font size if they need to. It would be
foolish for authors to start increasing the font size to compensate for
the bad move, just as it was always foolish to do a "correction" in the
opposite direction.
Of course, the sites still look fine if those users
set their text-size to medium, but face it -- most people don't
even know thats an option.
OK, let's presume that I get IE out of a box and start using it and it
has default font size set to something that is too small for me. That
is, when I surf around on pages that don't set font-size, I find the
text too small. Now, either I keep suffer from this, or I find a way to
fix it. Any wild guesses by authors that what I might _really_ need is
14 pixels are just shots in the dark.
I was willing to sacrifice the users control and specify a base
font size in the body tag (something like 14px),
The planned cure is much worse than the disease.
Or do I need to use Javascript to detect the browser and then load
the appropriate style sheet?


Stop being ridiculous. Detect the browser? Even if you could detect the
_relevant_ thing, the basic font size, how would your JavaScript code
detect the properties of the user's eyesight, the properties of the
printer, or the lightness of the room? If you found out that the font
size is 24pt and decided it surely must be reduced, you would most
probably make the page illegible, since people select such a large size
normally out of _necessity_.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2

P: n/a
On 24 Aug 2003 22:49:01 -0700, ma***@martigold.com (Marti) wrote:
Its my understanding that IE6 now uses a default text-size of "Small"
rather than IE5's "Medium".

Since I have used relative font-sizes (usually in ems) on all my
sites, I am now getting reports of "your fonts are too tiny" from
various users. Of course, the sites still look fine if those users set
their text-size to medium, but face it -- most people don't even know
thats an option.
You might like to consider the solution I use on my site: see sig.
I was willing to sacrifice the users control and specify a base font
size in the body tag (something like 14px),
So screwing up the users who know how to use their browser, in order to
help the users who don't. Not usually a good move.
So, is there any way for me to set the default text size to medium?
Or do I need to use Javascript to detect the browser and then load the
appropriate style sheet?


For something as simple as font size, educating the users is a far
better move.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #3

P: n/a
On Mon, Aug 25, Jukka K. Korpela inscribed on the eternal scroll:
On IE 6, if you set font-size:medium for some text on an otherwise
unstyled page, it has no effect, which is of course the correct
behavior.


Well, it _is_ the correct behaviour (CSS2 15.2.4 states that the
"initial value" of font-size is "medium"), but I'm not sure about the
"of course" bit.

In CSS's sizing system there are seven keywords, from xx-small to
xx-large. If we start from medium as the default, then there are
three keyword sizes smaller than normal, which I would tend to think
of as smaller-than-normal, uncomfortably-small, and so-small-as-to-be-
-useless.

The sizing system in HTML3.2(spit) also had seven sizes, denoted 1 to
7, but it's at least arguable that it was being more practically
realistic when it set its normal size (3) such that there were only
two sizes smaller than normal.

But that's only a what-if argument, of course. I'm not for a moment
suggesting that browser designers should unilaterally ignore the
specification. I _am_ suggesting that CSS authors should avoid the
xx-small keyword!
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.