I need text within a div to be preserved and to wrap. So far I am having a tough time coming up with a solution. The best solution I've been able to find doesn't work for all browsers.
The following works in Chrome and IE6+, but in Firefox the text is not wrapping.
white-space: pre;
word-wrap: break-word;
I've found that for whatever reason the text does not wrap in Firefox with white-space:pre. And -moz-pre-wrap does not work in Firefox 3.5 (why??), only pre-wrap. BUT when I add pre-wrap to the list, IE 6 and 7 don't work. Very frustrating.
The code:
.introsub {
position: relative;
top: 30px;
left: 25px;
width: 550px;
font-weight: normal;
line-height: 1.5em;
overflow: auto;
margin: 0;
padding: 1.5em;
white-space: pre;
word-wrap: break-word;
}
white-space: pre-wrap;