in reply to perl CGI: textfield and textarea width variability

You can use CSS to control the width and height of form elements, i.e. you can inline a style or give the element an id or class. You then need to omit the rows and columns attributes for textarea, and width attribute for text.

You will need to experiment a bit with this technique - I usually wrap each form element in a div and give each element a width of 90%.

Doing it this way means your script doesn't need to worry about browsers, but if you still have inconsistencies you can just change the CSS stylesheet rather than the HTML.

  • Comment on Re: perl CGI: textfield and textarea width variability