PRE CSS Code for All Browsers


/ Published in: CSS
Save to your folder(s)

Makes your PRE code wrap and work with all browsers.


Copy this code and paste it in your HTML
  1. pre {
  2. white-space: pre-wrap; /* css-3 should we be so lucky... */
  3. white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
  4. white-space: -pre-wrap; /* Opera 4-6 ?? */
  5. white-space: -o-pre-wrap; /* Opera 7 ?? */
  6. word-wrap: break-word; /* Internet Explorer 5.5+ */
  7. _white-space: pre; /* IE only hack to re-specify in addition to word-wrap */
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.