Hello!
I am working on an application which uses a lot of CSS for dynamic layouts as well as dynamic fields in which the sizes (width and heigth) are set in percentages so that screen resolution is not a display issue. In other words, the field sizes are dynamically relative to the screen resolution.I am encountering a problem though; it concerns textareas. When the textarea loads a very long unspaced string (a silly thing that shouldn't happen in the real-world but hey, it's part of the test cases...), the string never actually goes to the next line nor does a horizontal scrollbar appear. It just increases the width of the textarea to fit that one very long String into one line.
What I want is the textbox to either rely on vertical scrollbars or skip lines. Under Firefox I get the vertical scrollbars which is nice. How can I force one these behaviour under IE I've type using the 'wrap' attribute and 'word-wrap' under CSS but no dice.
Here's a very simple code demo:
<table style="width:100%;" border="1">
<tr>
<td style="width:75%;">
This cell should take 75% of the total width
</td>
<td style="width:25%;">
<textarea name="comments" style="width:100%;" rows="6">MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM</textarea>
</td>
</tr>
</table>
<tr>
<td style="width:75%;">
This cell should take 75% of the total width
</td>
<td style="width:25%;">
<textarea name="comments" style="width:100%;" rows="6">MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM</textarea>
</td>
</tr>
</table>
Developing, testing and deploying with IE version 6.