ASD ASD -4 years ago 98
CSS Question

textarea's rows, and cols attribute in css

I am trying to set the textarea's rows and columns attributes via css. How would I do this in CSS?

Answer Source

width and height are used when going the css route.

<!DOCTYPE html>
<html>
    <head>
        <title>Setting Width and Height on Textareas</title>
        <style>
            .comments { width: 300px; height: 75px }
        </style>
    </head>
    <body>
        <textarea class="comments"></textarea>
    </body>
</html>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download