473,701 Members | 2,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any way to set default text size to medium?

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
3 7103
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4108
by: Joe Patrick | last post by:
On my websites index.html page I have this script: <SCRIPT language="JavaScript"> <!-- // if ((screen.width==1024) && (screen.height==768)) { document.write('<a href="active.html">Click here</a> to Enter Railways Online); } else {
55
4993
by: Haines Brown | last post by:
I've been setting font-size 1em; as the default in my style sheets. Until now, that seemed to be ok. But now I'm beginning to wonder. My aim is to have an easily readable, but not overly large text when the user uses the default font size in his browser and uses the typical display resolution. I did a reinstall of my friendly browser in a different environment, and I am surprised to find that its default for serif is Times 16 and
1
1514
by: Douglas Pollock | last post by:
I've been trying to use HTML text that will scale up or down using the Internet Explorer 6.0 menu View\Text Size. I'm using CSS to set the sizes and weight. When I use View\Text Size Medium and CSS the results are Product line - font-size: medium - result bolded Pricing line - font-size: small - normal When I use View\Text Size with any size not medium and CSS the results are
11
2377
by: dmsy | last post by:
Is there a way to use javascript to increase the overall document text size, just like if you click View->Text Size->Largest, Larger, Medium, Smaller, Smallest? This is on IE browser.
2
1791
by: robbiehenry | last post by:
I built my company's website and the content portion of the site uses text with styles with relative values and the navigational part of the site uses text with styles with absolute values. The purpose of this was so that the end user could increase the size of the text on the webpage and only the content portion of the page would scale or resize but the navigation would not. This works as expected on a pc but the entire page scales on a...
4
3041
by: JohnSmith90 | last post by:
Wheh I make the following statement, what is the unit for the font size. <td colspan='1' bgcolor='#F4F4F4'><font face='Verdana' size='1'><b>TestData</b></font></td> Thank you very much for your reply. Smith
3
4004
by: acecraig100 | last post by:
I am fairly new to Javascript. I have a form that users fill out to enter an animal to exhibit at a fair. Because we have no way of knowing, how many animals a user may enter, I created a table with a createElement function to add additional entries. The table has the first row of input text boxes already in it. You have to click a button to add another row. That seems to be working fine. How do I pull the information from the input boxes...
4
6046
by: pablorp80 | last post by:
Hello, Here is what I need: I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback. Here is the problem: I am using AJAX and MasterPages as well as an update panel, the textbox is in a panel. I have tried to do it using different java scripts but I can't get it to work because I am not using asp forms, instead I am using Containers. Here is my code:...
58
5753
by: Don Li | last post by:
I've tried <body style="font-family:Verdana,Arial,Helvetica;font-size:0.8em;"> or <body style="font-family:Verdana,Arial,Helvetica;font-size:11pct;"> or <body style="font-family:Verdana,Arial,Helvetica;font-size:80%;"> to no avail. In IE7 it shows up as Medium. What did I do wrong? Thanks.
0
8737
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9232
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8978
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7827
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5905
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4411
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4665
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3104
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2036
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.