font size %

C

chlori

I've read that some people use a font size 100.01% to
prevent a bug from making fonts tiny.

For example here:
http://archivist.incutio.com/viewlist/css-discuss/39971

But I don't see many sites using 100.01%.

I read other people writing: "use % and use 100 of
them" while others say "use % but not exactly 100".

- What's really true?
- Why/when use 100% (or 100.01%) for <body> instead of
'no specified font size' at all?
- Can I use 100.01% for <body> and then em for the rest
(hx, p etc.) without any bug problems (like IE)?
 
S

Steve Pugh

chlori said:
I've read that some people use a font size 100.01% to
prevent a bug from making fonts tiny.

There was a bug in some older versions of Opera. But that's not
relevant now so this hack is no longer needed.

The author of that post states that he doesn't know why 100.1% is
needed.
But I don't see many sites using 100.01%.

I don't see many using 100% either. :-(
I read other people writing: "use % and use 100 of
them" while others say "use % but not exactly 100".

- What's really true?

Well that very much depends on which school of philosophy you belong
to. (He says giving an answer straight out of the sceptic school).
- Why/when use 100% (or 100.01%) for <body> instead of
'no specified font size' at all?

Good question. Some people prefer to use em for font sizes but thanks
to a bug in IE need to set 100% initially. Why they don't just use %
throughout is a mystery to me.
- Can I use 100.01% for <body> and then em for the rest
(hx, p etc.) without any bug problems (like IE)?

Yes. Or you can use % throughout.

Steve
 
D

Dylan Parry

Steve said:
Good question. Some people prefer to use em for font sizes but thanks
to a bug in IE need to set 100% initially. Why they don't just use %
throughout is a mystery to me.

It's not just for setting font sizes that em can be useful. It can also
be used for setting padding, width, height, margins etc. Using em, the
paddings et al. are set in relation to the size of text that they
contain, whereas if you were to use % then it would be in relation to
the canvas size.
 
C

chlori

Steve Pugh schrieb am 10.02.2005 13:11:
There was a bug in some older versions of Opera. But that's not
relevant now so this hack is no longer needed.

Why isn't it relevant now? Why not use that simple and
easy hack just in case 1 visitor comes with an old
opera version. Are there any disadvantages?
I don't see many using 100% either. :-(

Well that's true... :)
Good question. Some people prefer to use em for font sizes but thanks
to a bug in IE need to set 100% initially. Why they don't just use %
throughout is a mystery to me.

Why they don't just use *nothing* throughout is a
mystery to me...
 
S

Steve Pugh

chlori said:
Steve Pugh schrieb am 10.02.2005 13:11:

Why isn't it relevant now?

Opera users tend to upgrade fairly quickly. This bug was in v5 and v6
of Opera and was fixed in the 7.0 betas IIRC.

OTOH there are some Opera users who think that v5 was the best ever
and that everything since is a huge mistake.
Why not use that simple and
easy hack just in case 1 visitor comes with an old
opera version. Are there any disadvantages?

It looks messy?
It requires adding to documentation so future editors know why you've
done such a strange thing?

I don't think there's any technical disadvantage to this method so use
it you like, but please remember why you're using it - don't let it
become another piece of cargo cult nonsense that get's shoved into
every CSS file just because it has been shoved into every CSS file.

Steve
 
D

Dylan Parry

Dylan said:
Erm, yeah that's what I meant :)

Actually, no, that's not what I meant. What I should have said was "if
you were to use % then it would be in relation to the parent element's
dimensions."
 
T

Toby Inkster

Steve said:
OTOH there are some Opera users who think that v5 was the best ever
and that everything since is a huge mistake.

O5 was great. After O5, the UI started to get slower. It's still faster
than most other browsers, but not as fast as O5.

OTOH, the rendering engine in O7.x, and particularly in O7.5 is state of
the art. O5's rendering engine was good -- and people seem to forget how
good it was -- but lacked one or two major features -- in particular
reflowing, so some hover effects and dynamic pages could look awful and
overlap.

Would be nice to have an Opera that combined the UI of O5 with the
rendering engine, and customisable toolbars and menus of O7.
 
R

Richard

I've read that some people use a font size 100.01% to
prevent a bug from making fonts tiny.
But I don't see many sites using 100.01%.
I read other people writing: "use % and use 100 of
them" while others say "use % but not exactly 100".
- What's really true?
- Why/when use 100% (or 100.01%) for <body> instead of
'no specified font size' at all?
- Can I use 100.01% for <body> and then em for the rest
(hx, p etc.) without any bug problems (like IE)?

IMNSHO, if you're going to use font-size, then use it properly.
A font size is given in "points".
If you want to increase or decrease the font size, then change the points.
Forget using %. It's totally meaningless in fonts.
So what's 100% of 10px?
Duhhhhhhhh. 10px.

font-family: arial; font-size:12pt.
The machine does not have to do any extra work in conversion.
 
O

Oli Filth

Richard said:
IMNSHO, if you're going to use font-size, then use it properly.
A font size is given in "points".
If you want to increase or decrease the font size, then change the points.
Forget using %. It's totally meaningless in fonts.
So what's 100% of 10px?
Duhhhhhhhh. 10px.

**** off!

To the OP, please don't listen to *anything* Richard says, 99.9% of it
is shit, including this.

To clarify, specifying HTML font-sizes in pt is close to meaningless.
Specifying in pixel-size is kind-of ok, but doesn't allow the user's own
settings to take precedence, i.e. it's bad for accessibility issues.

Percentage *is* the most correct way to specify fonts (if you wish to
adhere to accessibility guidelines, good practices, etc.), as it means
that the text users see will be normalised to their browser settings.
 
D

Duende

While sitting in a puddle Richard scribbled in the mud:
IMNSHO, if you're going to use font-size, then use it properly.
A font size is given in "points".
If you want to increase or decrease the font size, then change the points.
Forget using %. It's totally meaningless in fonts.
So what's 100% of 10px?
Duhhhhhhhh. 10px.

font-family: arial; font-size:12pt.
The machine does not have to do any extra work in conversion.

For some reason I'm getting so I kinda like you. Just takes a while to see
where you're comming from.

--
 
J

JDS

IMNSHO, if you're going to use font-size, then use it properly. A font
size is given in "points".
If you want to increase or decrease the font size, then change the points.
Forget using %. It's totally meaningless in fonts. So what's 100% of 10px?
Duhhhhhhhh. 10px.

A reasonably god example of why Richard's advice is best not heeded.
 
B

Beauregard T. Shagnasty

Chlori, please disregard any advice by Richard. It is always wrong.

IYNSHWO. (In your not so humble wrong opinion)
if you're going to use font-size, then use it properly.
A font size is given in "points".

...on paper. Print media.
If you want to increase or decrease the font size, then change the points.
Forget using %. It's totally meaningless in fonts.

Wrong again, Robin. You have forgotten about all those IE users who
will not be able to resize your minuscule choice to something they can
read.
So what's 100% of 10px?
Duhhhhhhhh. 10px.

Your 10px is not the same as my 10px.
font-family: arial; font-size:12pt.

font-family: arial, sans-serif; font-size: 100%;
The machine does not have to do any extra work in conversion.

Less work? Worse for the visitor.
 
J

JDS

To the OP, please don't listen to *anything* Richard says, 99.9% of it is
shit, including this.

Frankly, I can't figure the guy (or girl?) out! So, really, who is he?
Why is he a kook? How old is he? Where is he? etc. I just gotta know.

Does he *really* have no capacity for learning? Or is it an act?

I'm talking about Richard, BTW.
 
R

rf

Richard said:
IMNSHO, if you're going to use font-size, then use it properly.
A font size is given in "points".
Wrong.

If you want to increase or decrease the font size, then change the points.
Wrong.

Forget using %. It's totally meaningless in fonts.
Wrong.

So what's 100% of 10px?
Duhhhhhhhh. 10px.

Finally a correct answer. however it is to the wrong question.

100% is used to stop a bug in IE where font size specified in ems causes the
font size to *dramatically* increase or decrease when the user changes font
size to smaller or larger.

the .1 in 100.1% is cargo cult.
font-family: arial; font-size:12pt.
Wrong.

The machine does not have to do any extra work in conversion.

Wrong. It has to convert from points to pixels.

In any case this is one multiplication and one division. Totally trivial
compared to the time spent rasterising the font.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top