How do I control the number of cols in a textarea? According to the Form API, you control the number of columns in a textarea with the #cols attribute.  However, setting this seems to have no effect when I use it inside a $form array (the companion #rows attribute works as expected).

This may just be a bug (and I understand that bug-reports are off-topic on SE DrupalAnswers). But I have searched the issue queues and haven't found any bug reports about this, which makes me suspect that there is something rather basic that I've misunderstood.

So: What is the correct way to control the number of  cols in a textarea?

Environment: Drupal 7 fresh install, Bartik theme with no customization.
Thanks David Thomas - CSS did it!

Since your comment is rather terse, I take the liberty of answering my own question where I describe how to use CSS in more detail.

To attach a CSS file, add the following to the form:

$form['#attached']['css'] = array(
  drupal_get_path('module', 'mymodule') . '/mymodule.css',
);


Then look at the HTML generated to find the class of the textarea:

&lt;textarea id="edit-mymodule-data" name="mymodule_data" cols="40" rows="2"
  class="form-textarea"&gt;
Please fill in some data.
&lt;/textarea&gt;


(Just for the record, notice that the values for cols and rows are picked up from the $form array, but unfortunately the value set for cols have no effect.)

The class of textarea is form-textarea, so placing the following in mymodule.css makes the textarea 100 pixels wide:

textarea.form-textarea { width: 100px; }