3 ms·
Given you've already fixed it with max-width I can't test this, but CSS 3 can also help out. The benefit of this approach is that the container can remain liqu
by Caged 17y ago
Given you've already fixed it with max-width I can't test this, but CSS 3 can also help out. The benefit of this approach is that the container can remain liquid:
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
You can read about this approach here: http://users.tkk.fi/tkarvine/pre-wrap-css3-mozilla-opera-ie.html http://users.tkk.fi/tkarvine/pre-wrap-css3-mozilla-opera-ie....
- audionerd 17y agoThat's a good solution for a certain case: when you want a long line of text to break to a new line upon reaching the edge of its container. But, for code samples, line breaks are significant to the understanding/execution of the code, and need to be preserved. A scrollbar is often better in these cases.