Just noticed that my code examples were not showing properly in Firefox.
The fix was simple. Added the following css property -
white-space: normal;
However now IE was not happy -
The correct property in this case was -
white-space: pre-wrap;
With “white-space:pre-wrap”, it's like mix of “pre”, and “normal”.
- Repeated spaces are shrinked into just one space.
- Newline char will force a wrap.
- Very long lines will be automatically wrapped too, by the element's width.
I found the information at xahlee useful when fixing this style issue.
No comments:
Post a Comment