Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble controlling the width of TEXT INPUT fields in Netscape 4 1

Status
Not open for further replies.

jaredc

Programmer
Jun 28, 2002
43
0
0
GB
Hi

I am making use of a number of TEXT type INPUT fields. I'm trying to control their height and width using the STYLE attribute; something like this:
Code:
<INPUT NAME=text1 STYLE=&quot;WIDTH=50px; HEIGHT=20px&quot;>
This works fine when viewed through IE but doesn't work when viewed through Netscape(4.7). This makes my page look a bit funny, so any advice on how to control the size of INPUT fields which would work in Netscape would be much appreciated.
 
You cannot control input field size using [tt]width[/tt] and [tt]height[/tt] CSS properties in NN4.x - it is not supported there.

What you can do (to be more exact, this is the only option) is to use a combination of [tt]size[/tt] attribute of the <input> tag with text properties of input field (and this is possible through CSS for NN4.x).

You have to play with the values a little and you'll get the text field looking almost or sometimes exactly the same (depending on your settings) as in other browsers that support CSS width.

I used to use this technique in many projects and it never fails.

good luck
 
Thanks very much for that Starway, I have had a a go with the SIZE attribute and got my page looking a bit less ridiculous!
Cheers
Mike
 
This problem appears to have been carried over into Netscape v6+. Can anyone confirm this (besides me!)?

Miles

Those Micros~1 guys sure know what they doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top