Controlling font size accurately across browsers

A

Andy Dingley

I have a large commercial site to rebuild, where the design has been
produced by the pixel-counting method. It's also one of those sites
where cramming every space full of content is seen as better than a more
spread-out and usable design that uses some scrolling. Not surprisingly
it's the work of paper-based magazine designers, not web designers.

This leaves me with several conflicting requirements:

- The body text size for the "article" pages should be 1em, for
well-known usability reasons.

- The "index" pages may require pixel-based font sizing control,
because otherwise I can't constrain the text to fit in the available
space. These spaces are fixed pixel widths - they're usually the size of
a bitmap image. Additionally they're often "headline text" which means
few short words and some clunky behaviour for linewrapping.

- It must work cross-browser, including IE6 and IE/Mac


The real problem here is that IE blows the whole lot apart. With its
well-known problems of an excessive default scaling for ems to pixels, I
can produce a good implementation for the well-behaved browsers (even on
the Mac) but any IE rendering of the page only works when the user's
text size is reduced to "Smaller". This is particularly bad if I attempt
to use <h*> markup, where the differences are particularly visible.

Any suggestions ?

Are there any "CSS hack" based techniques which will let me set a
default size of 1em/100% for web browsers, then an 85% value for IE
only, hidden by some parser hack ?


(I am _not_ interested in a discussion of em vs. pixel sizing - that's a
different issue)
 
C

C A Upsdell

Andy said:
I have a large commercial site to rebuild, where the design has been
produced by the pixel-counting method. It's also one of those sites
where cramming every space full of content is seen as better than a more
spread-out and usable design that uses some scrolling. Not surprisingly
it's the work of paper-based magazine designers, not web designers.
The real problem here is that IE blows the whole lot apart. With its
well-known problems of an excessive default scaling for ems to pixels, I
can produce a good implementation for the well-behaved browsers (even on
the Mac) but any IE rendering of the page only works when the user's
text size is reduced to "Smaller". This is particularly bad if I attempt
to use <h*> markup, where the differences are particularly visible.

Any suggestions ?

Are there any "CSS hack" based techniques which will let me set a
default size of 1em/100% for web browsers, then an 85% value for IE
only, hidden by some parser hack ?

(I am _not_ interested in a discussion of em vs. pixel sizing - that's a
different issue)

body { font-size:85%; voice-family: "\"}\""; voice-family:inherit;
font-size:medium; }
 
A

Andy Dingley

body { font-size:85%; voice-family: "\"}\""; voice-family:inherit;
font-size:medium; }

But isn't that (the Tantek Celik hack) just going to work on IE5 ? I
need to make it work on IE6


(By some bizarre logic, I don't actually need to support IE5 / PC as my
boss won't be testing for that, but he will be carefully testing the
almost unused IE5/Mac combination)
 
C

C A Upsdell

Andy said:
But isn't that (the Tantek Celik hack) just going to work on IE5 ? I
need to make it work on IE6

Works for me with IE6. Don't know about IE7.
 
M

Martin Geisler

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDLdt26nfwy35F3TgRAg3bAJoCXF5Z2wyNg+XWLCIjAQrJ6N6t/QCgxHLq
/vTPJN+Kqe3BZEMmtYFZMb0=
=5FNq
-----END PGP SIGNATURE-----
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top