header
 
     
 
pixel
pixel pixel

Specify HTML form width by pixels

You can neaten up your HTML forms by defining the width of all your form boxes and drop down menus in pixels rather than characters or columns. Eg -
<select name='variablename' style='width:210px;'>
<input type='text' name='variablename' style='width:210px;'>
<textarea name='variablename' rows=5 style='width:210px;'></textarea>

Unhelpful Helpful Rating 4.2 (score out of 5, no. of ratings: 69)
Comments
Comment by Robert on 2005-02-23
Such a small tip made a big difference, Thank You.

Comment by Thomas on 2005-03-11
What I needed, Thanks

Comment by Joh on 2005-04-20
ta dude, its a code most guys dont know.

Comment by Jon Hartman on 2005-06-03
Thank you; I've been wracking my brain over this one...

Comment by Offroad on 2005-06-29
You SO ROCK

Comment by Rat on 2005-08-26
Thanks much, also works with percents!

Comment by Carsten on 2007-01-27
Thanks for tip re form width by pixels. How do you do this \"Security image\"

Post a Comment
Name
Email
(optional)
Comment
RatingUnhelpful Helpful
Security Image* (this is just to prevent spam submissions)
Security Image