I like to try to keep my pages html4 compliant. I have some textarea's, which should only go to a new line when a return is given.
At the moment the only way I know to do this is:
<textarea name="dummy" rows="3" cols="15" wrap="off">
But this is not compliant. Is there a way to do this following the standards?Having just trawled through my entire site (wwww.org.uk (<!-- m --><a class="postlink" href="http://wwww.org.uk">http://wwww.org.uk</a><!-- m -->)) and ran every page through the W3C validator, I came across the same problem: it doesn't like wrap="off".
After some experimental and imaginative uses of CSS, I have found that the following works:
<textarea style="word-wrap: normal; overflow-x: scroll;">
Obviously you can adjust the overflow-x bit to suit your particular scrolling needs.
I have yet to check this with the CSS validator! (I know it's not too keen on overflow-x but that's not the end of the world)
Hope this is of some help
Cheers,
Adamwhat about style="white-space:nowrap"I tried both possebilities, but neither does work in FireFox.
At the moment the only way I know to do this is:
<textarea name="dummy" rows="3" cols="15" wrap="off">
But this is not compliant. Is there a way to do this following the standards?Having just trawled through my entire site (wwww.org.uk (<!-- m --><a class="postlink" href="http://wwww.org.uk">http://wwww.org.uk</a><!-- m -->)) and ran every page through the W3C validator, I came across the same problem: it doesn't like wrap="off".
After some experimental and imaginative uses of CSS, I have found that the following works:
<textarea style="word-wrap: normal; overflow-x: scroll;">
Obviously you can adjust the overflow-x bit to suit your particular scrolling needs.
I have yet to check this with the CSS validator! (I know it's not too keen on overflow-x but that's not the end of the world)
Hope this is of some help
Cheers,
Adamwhat about style="white-space:nowrap"I tried both possebilities, but neither does work in FireFox.