Faqts : Computers : Programming : Languages : JavaScript : Forms : TextAreas/TextFields

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

28 of 31 people (90%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

How can i set the size of a textfield for IE5.x and NN4.x to get an equal look?(with font arial)
I've tried the size of a textfield for IE5.x and NN4.x to get an equal look, still doesn't look equa

Jun 27th, 2001 02:14
Jean-Bernard Valentaten, titus tscharntke, thi nguyen,


No JS question!!!
Here's the answer anyways:
This is going deep into the mysteries of crossbrowser programming *g*
The trick is very easy though. NN4.x doesn't use CSS for input-fields, 
IE5.x does, so an input-tag should look like this:
<input type="text" style="width: 100px; height: 15px; font-size: 12px;" 
length="25" maxlength="120">
OK, now all you have to do is tweak around with the width/height in the 
style attribute and the length attribute until they look alike in both 
NN4.x and IE5.
HTH