Is there a css style that IE7 and Firefox will obey that changes the behavior of a TEXTAREA so that it behaves more like.... um..... more like the thing I'm typing into right now!
views:
542answers:
4Try typing then text without space and you will see a horizontal scrollbar.
Do the view source on this page to see what style applies to this textarea ;)
While it is not in the HTML specifications, I believe you're looking for:
<textarea wrap="soft"></textarea>
Word-wrapping is the default behaviour of <textarea>s. However, it will make a horizontal scrollbar if you write a bunch of text without any spaces. If you just mashed the keys on your keyboard to test your textarea, that's how you might have gotten a scrollbar and thought it wasn't wrapping.
well the default behavior (as was specified by w3c) is that text areas should wrap only upon encountering a whitespace, if for example you'd type 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
notice that it exceeds the cols
attribute of a textarea and so it automatically instructs the text area to provide a horizontal scroll bar at the bottom
but only users who intend to ruin your site's design would do that anyway (i wonder what they'd get afterwards)
anyway the wrap attribute of a textarea is not relevant to how it would look in a browser except for wrap="off"
as it is more concerned of how it would send the value of whitespaces in your forms
here's a short reading wrap tutorial