Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > font size %

Reply
Thread Tools

font size %

 
 
chlori
Guest
Posts: n/a
 
      02-10-2005
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)?

--
chlori
 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      02-10-2005
chlori <chlori@.invalid> wrote:

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

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


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

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
 
Dylan Parry
Guest
Posts: n/a
 
      02-10-2005
Steve Pugh wrote:

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

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
 
Reply With Quote
 
Spartanicus
Guest
Posts: n/a
 
      02-10-2005
Dylan Parry <(E-Mail Removed)> wrote:

>whereas if you were to use % then it would be in relation to
>the canvas size.


Viewport width.

--
Spartanicus
 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      02-10-2005
Dylan Parry <(E-Mail Removed)> wrote:
>Steve Pugh wrote:
>
>> 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.


I know. I was talking solely about the usage for font-size.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
chlori
Guest
Posts: n/a
 
      02-10-2005
Steve Pugh schrieb am 10.02.2005 13:11:
>>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.


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?

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

>
> I don't see many using 100% either.


Well that's true...

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


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

--
chlori
 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      02-10-2005
chlori <chlori@.invalid> wrote:
>Steve Pugh schrieb am 10.02.2005 13:11:
>>>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.

>
>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

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
Dylan Parry
Guest
Posts: n/a
 
      02-10-2005
Spartanicus wrote:

>>whereas if you were to use % then it would be in relation to
>>the canvas size.

>
> Viewport width.


Erm, yeah that's what I meant

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
 
Reply With Quote
 
Dylan Parry
Guest
Posts: n/a
 
      02-10-2005
Dylan Parry wrote:
> Spartanicus wrote:
>>> whereas if you were to use % then it would be in relation to the
>>> canvas size.

>>
>> Viewport width.

>
> 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."


--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      02-10-2005
Steve Pugh wrote:

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

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating font with fixed font size andreasbell Software 1 08-30-2010 09:39 PM
Swing Font, it's Java Font? ot native? how install new font? mttc Java 2 07-03-2009 07:29 PM
Printing with specific font-type and font-size wial Java 2 11-27-2008 05:30 PM
Windows XP explorer font and font size Lookout Computer Support 0 06-04-2006 02:58 AM
Selecting font size based on available font dave richards HTML 2 02-19-2004 02:47 PM



Advertisments