Reputation: 13
I am using following code to wrap the <PRE>
region in HTML:
<PRE style = "white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
It is working fine on chrome and Mozilla but the same is not working for IE. I am using IE9.
Please tell me if any other property needs to be set to wrap the text in IE?
Upvotes: 0
Views: 1025
Reputation: 1104
For IE 6 and 7 you need to wrap your text with a tag and give it a white-space property. Since you already have a tag wrapped around your text and you have a class for it, just add the white-space property to your do something like this
#pre-wrap {
white-space: pre-wrap;
}
<p id="pre-wrap">
Lorem ipsum dolor sit amet
consectetuer adipiscing elit sed diam nonummy
nibh euismod tincidunt ut laoreet
</p>
Upvotes: 1