Sent by Felix Miata on 9 February 2008 02:02
On 2008/02/07 11:43 (GMT-0500) Michael B Allen apparently typed:
> The font size in textarea elements on Firefox (on Linux at least) is
> about 70% the size of other input and select elements in the same form
> whereas in IE the font size is roughly the same across all form
> elements. I suspect this has more to do with the fact that textarea
> uses a courier font-family and FF preferences specifically use a
> smaller font for Courier but of course I have no control over that.
A study using IE of the bottom portion of
http://mrmazda.no-ip.com/auth/Font/fonts-face-samplesM.html will reveal what
IE does and why FF is set to do as it does, which is to match IE behavior on
the M$ platforms. You will see the exact same behavior on a 96 DPI Linux
desktop with FF as with IE on doz if you have the M$ fonts installed, select
them as the default families, and change the default monospace size from 12
You can see there that the monospace default Courier New in lower case at
10pt is the closest match in apparent size to the proportional default Times
New Roman in lower case at its 12pt default. Courier New is a little wider,
but also a bit shorter. Any other size match-up would produce a larger
disparity in apparent sizes when proportional is interspersed with monospace.
You can also see that IE is using 10pt Courier New in its internal stylesheet
for PRE, CODE, TT, SAMP & TEXTAREA, though not for INPUT.
FF defaults are set in px. 16px is its proportional default. At 96 DPI, 16px
is exactly 12pt, which makes the FF proportional match IE's 12pt default.
Also at 96 DPI, 13px is the closest available match to 10pt, which is why FF
has monospace set to 13px on M$ & Mac. Once upon a long ago time on Linux,
most fonts were bitmap. Back then with the commonly available fonts 12px
turned out to be a better match for 10pt than did 13px, and that legacy has
held into today, even though bitmap fonts on Linux are all but extinct,
besides grossly inferior for use on web pages.
> So how does one get the same textarea font size behavior between FF and IE?
There are multiple ways:
1-Don't try to change their size or family. Your own
http://www.ioplex.com/~miallen/test100.html shows that.
2-Specify only proportional fonts for your textareas.
3-Specify plenty of common known monospace font names for the textareas, but
not the generic monospace: http://mrmazda.no-ip.com/auth/Font/Tmp/testx.html
4-This is not a *good* idea, because IE<v7 users generally don't know how to
change the size you pick to a size that works for them, but set a size in pt.
At any given DPI, a pt is a pt is a pt regardless which browser is displaying
them. Pt is better than px, because you can feel reasonably assured that a
given nominal pt size will remain approximately that same physical size
regardless of the actual DPI. Conversely, px are always an unknown size in
the absence of knowing actual DPI, and what is a good px size for X DPI is
almost assuredly not equally good when the actual DPI is 50% more or less
than X DPI. To get an perspective on this latter statement, take a look at
http://mrmazda.no-ip.com/SS/SC/sc-micall-monospace1.jpg which is a screenshot
of slight variations of Michael's testcases that I consolidated into one page
I've saved Michael's testcases separately in two flavors each, once in
standards mode and once in quirks mode, so that the differences as a
consequence of rendering mode can also be compared:
"For God so loved the world that he gave his one
and only Son, that whoever believes in him shall
not perish but have eternal life." John 3:16 NIV
Team OS/2 ** Reg. Linux User #211409
Felix Miata *** http://mrmazda.no-ip.com/
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/