[thelist] Netscape 4.7 playing havoc with form pages

Phil info at webdisplays.com
Fri Aug 3 05:49:34 CDT 2001


>Date: Thu, 2 Aug 2001 11:55:04 +0100  alastair wrote
>
>Netscape usually does this, can't remember the exact reason but basically it
>measure character widths differently (??).  One way to fix is to use css.
>
>> From: "sfmalo" <sfmalo at email.msn.com>
>>
>> Just revised a client's site and discovered that the two form pages
>> are displaying catywampus in NN4.7 at 800x600 resolution. The boxes in
>> the forms are distorted and I'm getting horizontal scrolling on each

<tip>
If CSS styles (text/css) can be avoided, the simplest work around is to use 
Netscapes original, native (text/javascript) style language which will
correct the 
N4 presentation and be ignored by other browsers which now only use the css. 

To avoid the nuisance of classes and ids with varying form elements, here is
the universal workaround for otherwise "fontless" form elements:

<style type="text/css">

input {font-family: monospace; font-size: 7pt;}
select {font-family: monospace; font-size: 7pt;}
textarea {font-family: monospace; font-size: 7pt;}

/* sets a HTML 4.0 (t) base font */ 
</style>
<style type="text/javascript">
//<!--

tags.input.fontFamily= 'monospace';
tags.select.fontFamily= 'monospace';
tags.textarea.fontFamily= 'monospace';
tags.input.fontSize= '9px';
tags.select.fontSize= '9px';
tags.textarea.fontSize= '9px';

// tweaks an equivalent to IE-N6 size for N4 -->
</style>

Note that for N4 to present an equivalent font width to IE, the "px : pt"
ratio must be as shown. "pt" is not rendered the same between the two
browsers! N4 might, at first, honor the css, but then, the more intimate
javascript takes precedence.

Example is about the smallest you can go.

</tip>

Phil Stark
webdisplays





More information about the thelist mailing list