tags:

views:

318

answers:

2

It seems that to be XHTML compliant an HTML textarea needs to have the cols property set. I want to use CSS instead so I can just expand the textarea to 100% style="width: 100%;"

How should I be doing this in a standards compliant way?

+2  A: 

Use both. That way, if CSS is disabled or not implemented on the target browser, it still works.

lod3n
+2  A: 

I usually set a reasonable cols and rows amount, like 60 and 5. If you specify the width using CSS the cols and rows attributes don't have any function.

Georg