Jump to content

Textbox problem


szeltan
 Share

Recommended Posts

Hi!I have a problem: the standard textbox component is bigger than any component with the same size. :) Here is an example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Textbox Test Document</title></head><body><form id="form1" name="form1" method="post" action="">  <input type="text" name="textfield" id="textfield" style="width:100px;" />  <br />  <select name="select" id="select" style="width:100px;">	<option>temp</option>  </select></form></body></html>

I tried this html code on 3 browsers: IE7, FF3 & Opera 9.52 and I got the same thing: The 100px wide TextBox is appr. 5px wider than the 100px wide Select...Anyone can illuminate me why, or how to get around it?

Link to comment
Share on other sites

Try giving it no border to see if that's what's causing the problem.input { border: 0; }
Nope... The no-border textbox is virtually invisible :)Although setting the paddig to 0 shrinked the difference between the two controls, if not eliminated it.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...