Reputation: 9512
I am trying to display some JSON data in a pre
block but Bootstrap's work break doesn't seem to be working.
How can I make the data to be displayed in the next line instead of the same?
Upvotes: 0
Views: 885
Reputation: 34652
Demo: http://jsfiddle.net/v6yxe/
Bootstrap's Pre doesn't break, you have to add your own CSS.
pre#target {
white-space: pre; /* CSS 2.0 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3.0 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap; /* HP Printers */
word-wrap: break-word; /* IE 5+ */
}
Source: http://perishablepress.com/wrapping-content/
Upvotes: 2