The Woo
The Woo

Reputation: 18645

IE Issue With Input Box Size

I am using Dreamweaver to make a HTML page. I have a textbox for the user to type into. When I change the following:

<input type="text" id="email" name="email" size="40px" /> when I view it in Firefox, the box size changes, but in IE it says at the default size by the look of it.

Why is IE being such a pain...

Upvotes: 0

Views: 4677

Answers (2)

Livingston Samuel
Livingston Samuel

Reputation: 2422

Wrong:

<input type="text" id="email" name="email" size="40px" />

Right:

<input type="text" id="email" name="email" size="40" />

The 'size' attribute for input type 'text' and 'password' refers to the (integer) number of characters. Ref: W3C HTML Forms Spec

Upvotes: 1

Bertine
Bertine

Reputation: 630

Do this instead:

<input type="text" id="email" name="email" style="width:40px" />

Upvotes: 8

Related Questions