Reputation: 157
I am using <pre>
tag in my html page but it not displaying the full line. What I wanted to display is the hwole two below lines:
Hello Wish you all the best. This is just a testing of multiline as it is cutting the print work order.Multi formatting within email notifications and work order comments/notes End Line. Last Comment.
But it is only displaying
<pre>
Hello Wish you all the best. This is just a testing of multiline as
End Line. Last Comment.
</pre>
Does the pre tag has fixed widht or something? Any suggestions will be welcomed.
Upvotes: 0
Views: 577
Reputation: 5263
You would need an overflow for the hidden stuff to show up in case the overflow was hidden. This will add a scrollbar.
pre {
overflow: auto;
}
Or you would need to wrap the pre tag if scrolling is not an option. For that use
pre {
white-space: pre-wrap;
}
Now the line will wrap and show in the next line while still maintaining the white spaces.
Upvotes: 2
Reputation: 3761
Here's the code you gave, wrapped in a pre tag. Looks fine from my house.
<pre>
Hello Wish you all the best. This is just a testing of multiline as it is cutting the print work order.Multi formatting within email notifications and work order comments/notes
End Line. Last Comment.
</pre>
Upvotes: 1