5 ms·
Its <pre><code>foo</code></pre>. All browsers will not automatically wrap text inside pre tags, since the text inside pre is supposed to have both width and li
by uxp 15y ago
Its <pre><code>foo</code></pre>.
All browsers will not automatically wrap text inside pre tags, since the text inside pre is supposed to have both width and line-breaks preserved. Scroll with two fingers inside the box to view whatever has been hidden by "overflow: scroll;". If you find a site that lets pre code snippets overflow into the right sidebar and off the screen, let them know their site is unusable and to add an overflow CSS rule to make it respect smaller screen widths.
- shadowfiend 15y agoYou can also use white-space: pre-wrap to allow wrapping in preformatted text.