Font Sizes (yet again)

B

Bob

OK... been toying around with font sizes, I know the up and downs
of making changes, and I'm trying to be a good boy and keep it
flexible for the user. But, what I need to do is to have slightly
smaller than normal text for some pages. So, I figured I'd do
something like this:

<style> <!-- td { font-size: 1em } --> </style>

That does what I need and still leaves it flexible for the user. The
only issue I have now is that NN4 sizes everything one notch larger
on the size scale than IE & NN6+/Moz. If at all possible, I'd like to
get relatively consistent sizing to start with.

Any nifty work arounds for NN4 to beat it into submission ?
 
T

Thomas Jollans

Bob said:
OK... been toying around with font sizes, I know the up and downs
of making changes, and I'm trying to be a good boy and keep it
flexible for the user. But, what I need to do is to have slightly
smaller than normal text for some pages. So, I figured I'd do
something like this:

<style> <!-- td { font-size: 1em } --> </style>

That does what I need and still leaves it flexible for the user. The
only issue I have now is that NN4 sizes everything one notch larger
on the size scale than IE & NN6+/Moz. If at all possible, I'd like to
get relatively consistent sizing to start with.

Any nifty work arounds for NN4 to beat it into submission ?

NS4 doesn't know this neat little trick:

<style>
<!--
@import url(style.css);
-->
</style>

so you can have
<link rel=stylesheet type=text/css href=style4ns.css>
<style>
<!--
@import url(style.css);
-->
</style>

where style4ns.css is a style sheet for ns and style.css changes the
stuff so that it fits for mozilla.

Thomas
 
J

Jukka K. Korpela

Bob said:
- - what I need to do is to have slightly
smaller than normal text for some pages.

OK, then make it 90%. Or maybe 85%.
<style> <!-- td { font-size: 1em } --> </style>

If it makes the text in a cell smaller, consider it a browser bug.
The em unit (when used in font-size value) means the font size of the
parent element, in this case <td>. It should normally inherit its font
size from its parent, <table>, which should inherit it from <body>.
Hence, you should get the basic font size on the page, _no_ change.

In theory, a browser could have a browser style sheet with, say,
td { font-size: 1.1em; }, meaning that all text in tables is in
increased size by default. And then setting font-size: 1em would have
an effect. But this isn't what IE does. It simply gets things wrong.

This is one reason why percentages are better than em unit when setting
font-size. In principle, font-size: 1em and font-size: 100% are
completely equivalent. In practice, IE often gets the first wrong and
the second right. Thus, to reduce font size in table cells,

<style type="text/css">
td { font-size: 90%; }
</style>

is OK. (Netscape 4 calculates percentages a bit wrong, but we can
ignore such phenomena. Anyone who expects to have pages well styled on
Netscape 4 in the present world needs to have reality checkers
calibrated.)

Just remember that things change quite a bit if you have nested tables.
Then you need to take precautions to prevent double or triple effects.
 
S

Sid Ismail

: OK... been toying around with font sizes, I know the up and downs
: of making changes, and I'm trying to be a good boy and keep it
: flexible for the user.


Then leave it alone.

Sid
 
R

rf

Bob said:
OK... been toying around with font sizes, I know the up and downs
of making changes, and I'm trying to be a good boy and keep it
flexible for the user. But, what I need to do is to have slightly
smaller than normal text for some pages. So, I figured I'd do
something like this:

<style> <!-- td { font-size: 1em } --> </style>

That does what I need and still leaves it flexible for the user. The
only issue I have now is that NN4 sizes everything one notch larger
on the size scale than IE & NN6+/Moz. If at all possible, I'd like to
get relatively consistent sizing to start with.

Any nifty work arounds for NN4 to beat it into submission ?

Ctrl -

Cheers
Richard.
 
B

Bob

: OK... been toying around with font sizes, I know the up and downs
: of making changes, and I'm trying to be a good boy and keep it
: flexible for the user.


Then leave it alone.

Sid

See my reply to brucie.
 
B

Bob

If it makes the text in a cell smaller, consider it a browser bug.

Yes. sorry about that. I wrote that up as a "clean" example and
should have typed something like .9em... although IE does seem to
have some bugs on that very issue.
But this isn't what IE does. It simply gets things wrong.
noted.

In principle, font-size: 1em and font-size: 100% are
completely equivalent. In practice, IE often gets the first wrong and
the second right. Thus, to reduce font size in table cells,

Again noted. Same bug as above, I think.
Just remember that things change quite a bit if you have nested tables.
Then you need to take precautions to prevent double or triple effects.

Good tip, thanks.
 
L

Leif K-Brooks

Bob said:
I'm going to assume you skipped any graphic design courses.

This is a web page, not a magazine. I want *my* preferences obeyed,
which means reading text at the size I have selected.
 
B

Bob

This is a web page, not a magazine. I want *my* preferences obeyed,
which means reading text at the size I have selected.

What do you do if the magazine page uses a font size you don't like ?

Most businesses are of the opinion that a web page is to be
designed to *their* requirements - just like the magazine ad. They
pay for it, it's their choice.
 
B

brucie

What do you do if the magazine page uses a font size you don't like ?

use a magnifying glass besides its completely different medium. A WEB
PAGE IS NOT A PIECE OF PAPER.
Most businesses are of the opinion that a web page is to be
designed to *their* requirements

it would be a total tragedy if they were designed for the visitor.
- just like the magazine ad. They pay for it, it's their choice.

i pity your poor clients
 
E

Eric Bohlman

Most businesses are of the opinion that a web page is to be
designed to *their* requirements - just like the magazine ad. They
pay for it, it's their choice.

Ever wonder why printing presses are so expensive (even a small one that
can sit on top of a table can easily cost over $10,000)? It's because
making a machine that puts dots in the exact same places on thousands of
sheets of paper is a rather tough task. In a magazine ad printed by a
competent printer, every single character will be the exact same size
regardless of which copy of the magazine someone buys.

On the Web, though, things are different. People's viewing situations vary
widely. Pick two viewers at random, and it's quite unlikely that a pixel
is the same size for both of them (Justin and Jason both have 19" monitors.
Justin's is set for 1024x768 and Jason's is set for 1280x1024. If you fix
your font size at 12px, Justin and Jason will see *different*-sized text).
This leads to a sort of paradox; on the Web, the harder you try to fix
everything in terms of pixels, the *more* variation your users will see.
And the more flexibility you allow the user, the more likely it is that
their view of your page will approximate your view, even though the pixel
dimensions may be different.
 
B

Bob

i'm going to assume you're too stupid to answer a simple question.

Sorry, but your question makes an incorrect assumption and it is not
possible to answer it directly since I am not making the pages more
difficult to read. I am suggesting a font size to the user via a
style sheet. Should a user find the minor reduction in font size an
impediment to their reading process, the user may choose to use their
own style sheet or may simply choose to use a menu option to (easily)
increase or decrease the font sizes on the page.

Now, that said, whether you choose to agree with it or not, the web
is now an advertising medium. Not every site is the W3C and a bunch
of boring text specifications. Businesses design their sites (and in
fact an entire coordinated look for their publications) based on
graphical/visual appeal. That requires developing graphics in certain
sizes and including text elements. The relationship between the size
of the graphics and text is key facet of "graphic design" (Hence
my earlier comment regarding your lack of a professional graphics
design background). You may choose to ignore those design rules if
you wish. I do not.
 
B

Bob

If you fix
your font size at 12px, Justin and Jason will see *different*-sized text).

a. Reread my original post. I'm using a size algorithm that will vary
with the user's setup and is adjustable by the user.

b. Proportionally, everything will be the same. That's the key factor
in graphics design. However, I agree that the user needs control to
avoid difficult to read text. See (a) above.
And the more flexibility you allow the user, the more likely it is that
their view of your page will approximate your view, even though the pixel
dimensions may be different.

Not really. It is more likely that the text will be a size they like
if they choose it. Anything other than fixed proportional dimensions
(e.g. px sizes) causes users systems to vary widely in appearance.
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top