RE: Text Field Widths
by Rebecca Campbell <rcampbel(at)standard.com>
|
| Date: |
Wed, 5 Jan 2000 12:51:45 -0800 |
| To: |
"'Gary Bonham'" <Gary(at)BonhamDesigns.com>, hwg-techniques(at)hwg.org |
| |
todo: View
Thread,
Original
|
|
gary,
the only way i've been able to resolve this is to assign each <input
type="text"> a class. like
<input type="text" class="regular" size=25>
then, in css, have
.regular { width: 150px; }
or whatever you want it to be...
the deal with this is, netscape will ignore the class and make the input box
netscape's version of size=25. ie will pick up the class and apply the
pixel width.
it's a pain, but it's the only way i've found that will make input fields
show up the same cross-browser.
hth,
-rebecca
http://www.nerdygirl.com
-----Original Message-----
From: Gary Bonham [mailto:Gary(at)BonhamDesigns.com]
Sent: Tuesday, January 04, 2000 1:57 PM
To: hwg-techniques(at)hwg.org
Subject: Text Field Widths
I have a problem that I haven't found a way around as yet.
Most likely, it's something stupid, but here goes.
I have a number of pages with text entry fields in forms.
In both NN and IE 4.0 a size="3" yields a nice width field
for entering 3 digit numbers. In NN4.6 and 4.7, as well
as IE5, the field roughly doubles in length. To make it the
proper width, I have to set size="1", which yields a field
appropriate for entering a 3 digit number. However, the same
page in 4.0 shrinks to a single digit wide. I hate to think that
I have to do a complex check on browser type/version to
specify different widths depending on the browser. It seems
that they must be basing the width on some character width
somewhere that I can change, but try as I will I cannot locate
anything, other than size="1", that will make any difference.
I've stripped down one of these files, removing the vbscript, etc.,
and it's available at http://www.bannerforge.com/resizetest.asp
Note that the first field (width) has a size="1" while the others
have size="3".
Anyone have any thoughts on this?
Gary Bonham
http://www.bannerforge.com
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.