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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE vs NS INPUT and TEXTAREA sizes

Status
Not open for further replies.

MrSki

Programmer
Dec 13, 2000
66
US
Here is the problem...

We design a page with input fields and textarea fields sized to look good in IE. When we check it in NS the fields are way too large. But if we change the size to look good in NS, then they look too small in IE.

Is there a CSS Trick or Javascript or any other way to be able to set these fields to something that would be compatible with both browser types?

Mitch Duszynski
Web Developer
Human Kinetics
PO Box 5076, Champaign, IL 61825
Tel: 217-351-5076 x2474 | Fax: 217-351-2674
mitchd@hkusa.com |
 
you should assign the style to your form elements specifying it's dimentions and text attibutes, like this:

<style>
input, textarea {
font-size: 11px;
font-family: Verdana, Helvetica, Sans-Serif;
width: 90px;
}
</style>

This will make them look the same in all browsers.
good luck
 
Unfortunately that code does not make INPUT and TEXTAREA fields look the same in NS 4.x browsers. It DOES however work okay for IE and NS6.

Mitch Duszynski
Web Developer
Human Kinetics
PO Box 5076, Champaign, IL 61825
Tel: 217-351-5076 x2474 | Fax: 217-351-2674
mitchd@hkusa.com |
 
I forgot to add:
in addition to the style you should specify [tt]size=&quot;..&quot;[/tt] value of the [tt]<input>[/tt] tag, and [tt]cols=&quot;..&quot; rows=&quot;..&quot;[/tt] of the [tt]<taxtarea>[/tt].

Adjust it according to the width from your style, and you'll get the dimentions very similar (if not absolutely the same) to each other in all browsers.

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top