HighDots Forums  

Help! Crazy Font Sizes

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Help! Crazy Font Sizes in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Help! Crazy Font Sizes - 11-17-2003 , 12:01 PM






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

Reply With Quote
  #2  
Old   
Graham J
 
Posts: n/a

Default Re: Help! Crazy Font Sizes - 11-17-2003 , 01:23 PM






Quote:
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.

Quote:
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.

Quote:
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.




Reply With Quote
  #3  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: Help! Crazy Font Sizes - 11-17-2003 , 03:21 PM



*Kai Jaeger* <kai (AT) kai-jaeger (DOT) de>:
Quote:
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.


Reply With Quote
  #4  
Old   
kchayka
 
Posts: n/a

Default Re: Help! Crazy Font Sizes - 11-17-2003 , 04:14 PM



Christoph Paeper wrote:
Quote:
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.


Reply With Quote
  #5  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: Help! Crazy Font Sizes - 11-17-2003 , 04:51 PM



*kchayka* <kcha-un-yka (AT) sihope (DOT) com>:
Quote:
Christoph Paeper wrote:

body {font-size: 100.01%}

I'm curious - why the extra .01%?
For Opera 5 & 6.

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

--
"Music is essentially useless, as life is."
George Santayana


Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default Re: Help! Crazy Font Sizes - 11-22-2003 , 01:54 AM



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

Reply With Quote
  #7  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Help! Crazy Font Sizes - 11-22-2003 , 05:02 AM



kai (AT) kai-jaeger (DOT) de (Kai Jaeger) wrote:

Quote:
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.

Quote:
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.

Quote:
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/


Reply With Quote
  #8  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: Help! Crazy Font Sizes - 11-22-2003 , 06:08 AM



On Sat, 21 Nov 2003, Kai Jaeger wrote:

Quote:
Thanks to all the guys trying to help!
But your responses contradict your thanks.

Quote:
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.

Quote:
("designing with web standard", zeldman).
A commentator that's not unknown to the denizens of this group...

Quote:
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.

Quote:
(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.

Quote:
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).

Quote:
I have changed now to "xx-large" - "xx-small" settings,
thereby spitting in the collective face of the advice you got here.

Quote:
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.

Quote:
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.

Quote:
Again, thanks for help!
Hmmm.


Reply With Quote
  #9  
Old   
David Ross
 
Posts: n/a

Default Re: Help! Crazy Font Sizes - 11-22-2003 , 03:46 PM



Kai Jaeger wrote [in part]:
Quote:
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/>


Reply With Quote
  #10  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: Help! Crazy Font Sizes - 11-23-2003 , 11:03 PM



*David Ross* <nobody (AT) nowhere (DOT) not>:
Quote:
The basic problem is that em is relative to the size of the font
in the parent element.
Only for 'font-size', else it refers to said 'font-size'.

Quote:
Although permitted, em (and ex) should
never be used to specify the size of the font.
Huh? It always should IMNSHO.

Quote:
After all, what do you mean when you use em to specify the
font-size for the body element (parent to all other elements)?
The browser's default, ideally adjusted by the user to his needs.

Quote:
Good HTML design (...) should use only relative or percentage
sizes for fonts, leaving the body of the page with whatever
font-size the user chooses.
Absolutely, and that's what is accomplished by using 'em' for the task. Are
you contradicting yourself, or am I misunderstanding you?

--
"Right way turning, Listen we are learning.
Head's full of noise, Chicken's got no choice.
Heads are rollin', Chicken blood is stolen.
The rest of the chicken wants a picke-nicken" Guano Apes - We use the Pain


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.