473,659 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help! Crazy Font Sizes

I am playing with setting font sizes in CSS using em as unit of
measurement. All seems to be fine. Even Netscape Navigator shows the
characters very similar to IE, what is not the kind if px is used!

But!
when selecting the "Larger" or "Smaller" command from the menubar in
IE, font sizes increases from normal (1em) to, say, 6em or so _in the
first step_!!!
In the next step it seems to be 20em or say. Choosing "Smaller" makes
the text already unreadable in the first step: 2 pixels or so.

What in the hell is going on here?

Interestingly, Netscape 7.1 and Opera 7.2 both works well.

Does anyone have experience with this?

Kai
Jul 20 '05 #1
38 4580
> when selecting the "Larger" or "Smaller" command from the menubar in
IE, font sizes increases from normal (1em) to, say, 6em or so _in the first step_!!!
By 6em, I guess you mean six times as big as they were before you
changed the font size? Using em when describing something like this
isn't terribly helpful as what 1em is will change with the fontsize.
In the next step it seems to be 20em or say. Choosing "Smaller" makes the text already unreadable in the first step: 2 pixels or so.
I believe that by default IE on Windows will use something like 12px,
13px, 16px, 19px, 21px as the default body font sizes equating to
smallest, smaller, medium, larger and largest (I think there are
different defaults if you have a higher resolution screen), so seeing
such drastic changes does seem a little unusual.
What in the hell is going on here?


Unless someone can instantly spot something I can't, which they may
well do, I think it would be good to give a URL of a page where you
experience this, or failing that give some example markup.
Jul 20 '05 #2
Kai Jaeger wrote:
I am playing with setting font sizes in CSS using em as unit of
measurement.

when selecting the "Larger" or "Smaller" command from the menubar in
IE, font sizes increases from normal (1em) to, say, 6em or so _in the
first step_


IIRC, some versions of IE/Win have problems with font size set in em
units. Try using percentage instead. It will work as well in IE/Win
5+, IE/Mac, Moz, and Opera.

instead of h1 {font-size: 1.4em}
use h1 {font-size: 140%}

N4 has some problems with font-size: 100% for body, so you may want to
hide it from that browser.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #3
*Kai Jaeger* <ka*@kai-jaeger.de>:

when selecting the "Larger" or "Smaller" command from the menubar in
IE, font sizes increases from normal (1em) to, say, 6em or so


Try setting

body {font-size: 100.01%}

--
The Sausage Principle: People who love sausage and respect the law should never
watch either one being made.
Jul 20 '05 #4
Christoph Paeper wrote:

body {font-size: 100.01%}


I'm curious - why the extra .01%?

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #5
*kchayka* <kc*********@si hope.com>:
Christoph Paeper wrote:

body {font-size: 100.01%}


I'm curious - why the extra .01%?


For Opera 5 & 6.

<http://webdesign.criss ov.de/temp/body-fontsize8.html> (or without the 8)

--
"Music is essentially useless, as life is."
George Santayana
Jul 20 '05 #6
Thanks to all the guys trying to help!

However, in the meantime I found out that using em is definitly no
good idea ("designing with web standard", zeldman). Not only that the
IE3 runs into trouble (I am willing to ignore good-old-day-browsers),
but even the newest browser have really large problems when selectors
using em are nested.

I have changed now to "xx-large" - "xx-small" settings, and it works
fine on modern browsers. Only Modzilla runs into problems when
enlarging gets too high, since only the fonts are enlarged, nothing
else - especially not the text container.

Again, thanks for help!

Kai
Jul 20 '05 #7
ka*@kai-jaeger.de (Kai Jaeger) wrote:
However, in the meantime I found out that using em is definitly no
good idea
You mean you found compelling evidence that makes you ignore expert advice?
Interesting.
but even the newest browser have really large problems when selectors
using em are nested.
You are supposed to understand what the em unit means. Then you'll know how
to use it. It suddenly becomes obvious that when _elements_ are nested
(which is what you actually mean here), the use of em _must_ have cumulative
effect. And, of course, there might be errors in browsers here, as in
everything in CSS.
I have changed now to "xx-large" - "xx-small" settings, and it works
fine on modern browsers.


That indicates lack of sufficient testing (or sufficient reading about other
people's tests). Browser bugs are rather common, and the actual effects vary
- after all, there's just a _recommended_ scaling factor. And it is
symptomatic that the recommended scaling factor was 1.5 in CSS 1 and then
dropped to 1.2 in CSS 2. Even with 1.2, you get a very coarse tool. Surely
if you wish to increase or decrease font size, if you can only do that in
steps of 20%, or in something that _might_ be 20% or something else, you are
in a rather awkward position.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #8
On Sat, 21 Nov 2003, Kai Jaeger wrote:
Thanks to all the guys trying to help!
But your responses contradict your thanks.
However, in the meantime I found out that using em is definitly no
good idea
I don't think you did. You just found a commentator that told you a
different story, but you haven't had time and depth of experience to
evaluate their advice yet.
("designing with web standard", zeldman).
A commentator that's not unknown to the denizens of this group...
Not only that the IE3 runs into trouble
IE3 "runs into trouble" with almost any significant use of CSS. In
any case, there are very few users, so it's not unreasonable to just
hide the CSS from them and leave them to get unadorned content. You'd
be a complete fool to let considerations of IE3 dominate your choice
of CSS strategy for current browser usage profiles.
(I am willing to ignore good-old-day-browsers),
I'm certainly _not_ prepared to "ignore" any browser that might be
still in practical use, but I don't mind them missing the
presentational details of CSS. After all, CSS is designed to be
optional: a properly-made web page will still give sensible access to
properly-marked-up HTML content, even when some or all of the CSS
features are switched off.
but even the newest browser have really large problems when selectors
using em are nested.
On the contrary: it's the old browsers that get nesting wrong.

(And authors who got accustomed to designing for the bugs of old
browsers, and now don't seem to be able to cope with spec-conforming
behaviour).
I have changed now to "xx-large" - "xx-small" settings,
thereby spitting in the collective face of the advice you got here.
and it works fine on modern browsers.
You haven't had the time or experience, in between posting your
original question and now, to evaluate that yet.
Only Modzilla runs into problems when
enlarging gets too high, since only the fonts are enlarged, nothing
else - especially not the text container.
If you think that's your problem, then there's something else that
you're doing wrong also.
Again, thanks for help!


Hmmm.
Jul 20 '05 #9
Kai Jaeger wrote [in part]:

I am playing with setting font sizes in CSS using em as unit of
measurement. All seems to be fine. Even Netscape Navigator shows the
characters very similar to IE, what is not the kind if px is used!


The basic problem is that em is relative to the size of the font
in the parent element. Although permitted, em (and ex) should
never be used to specify the size of the font. After all, what do
you mean when you use em to specify the font-size for the body
element (parent to all other elements)?

Good HTML design -- design that considers the person viewing the
page (the end user) -- should use only relative or percentage
sizes for fonts, leaving the body of the page with whatever
font-size the user chooses. That accommodates those users who are
visually handicapped and have to set special sizes, those users
who have larger or smaller monitor screens than we expect, laptop
users, etc, etc.

From the CSS1 specification (Section 6.1):
"Style sheets that use relative units will more easily scale from
one medium to another (e.g. from a computer display to a laser
printer). Percentage units (described below) and keyword values
(e.g. 'x-large') offer similar advantages."

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone snooping into your E-mail?
Use PGP. See my <http://www.rossde.com/PGP/>
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

131
21634
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately get some good real world examples. Fire away! :) Regards, Peter Foti
60
4759
by: deko | last post by:
As I understand it, most browser manufacturers have agreed on 16px for their default font size. So, this should be an accurate conversion for percentages: px % 16 = 100 14 = 87.5 13 = 81.25
0
8427
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
8332
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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...
0
7356
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...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
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
4175
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...
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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.