tags:

views:

27

answers:

1

Hi I have a form with a text area for comments. The problem is my code below should produce a textbox 3 rows high but when it is displayed in Chrome it only ever appears as one line , Can anyone suggest what I am doing wrong please?

<tr>    
    <td >&nbsp;</td>
    <td ><strong>Approver Comments</strong></td>
    <td colspan="3" >
    <textarea name="approvecom" cols="100" rows="5" autocomplete="OFF"></textarea>
    </td>
    <td >&nbsp;</td>
</tr>
+1  A: 

Try using height and width CSS definitions to define the bounds of your textarea instead.

<textarea style="height:100px; width:300px;"></textarea>
Nathan Taylor
cols and rows attributes there are for textarea for this reason, why to define something with css? just wondering :)
Sotiris
Thanks Nathan it works fine. But why does rows and cols not ?
Mick
Despite the the fact that height/width CSS works, I agree with @Sotiris that defining rows and cols also works. That being said, one advantage of using the CSS approach is that you can control the textbox externally, whereas using HTML attributes limits you to inline changes only.
Nathan Taylor