? In practice, people say that they use it successfully ...">

Is "width" used for the text box?

Is the CSS property 'width'applicable to <textarea>?

In practice, people say that they use it successfully , for example, using a rule like this:

textarea
{
    width:100%;
}

What bothers me is that the CSS 2.1 specification for width says:

This property indicates the contents of the width of the boxes generated by the block level and replaced items. This property does not apply to non-replaced line level elements.

I thought the text box is an element at the line level, because, for example, markup like this ...

<p>
This is some more text:
<textarea name="mytextarea" rows="3" cols="15">Text in the text area</textarea>
And even more, more text.
</p>

... creates a single paragraph block with text to the left and right of <textarea>, and therefore, according to the specification, the width should not be applied.

+5
3

Textarea - ... ( , ).

, textarea .

+6

textarea. cols rows, CSS.

0

All Articles