how to render preformatted text with overflow #4439
-
Hi All, Would you be so kind to advise how can a piece of text be rendered with horizontal and vertical scrollbars? In the example below,
The output is
And the problem is with the long lines that don't overflow or the too many lines of output sometimes. with kind regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey! Try moving your utility classes to the <pre class="pre-scrollable h-24 overflow-y-auto">
<code>
{{ output_data.cli }}
</code>
<pre> Not sure if this is exactly what you want (and what the https://play.tailwindcss.com/Err1qC6lkh Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
thanks a lot! it did help :) |
Beta Was this translation helpful? Give feedback.
Hey!
Try moving your utility classes to the
pre
tag instead of the code:Not sure if this is exactly what you want (and what the
pre-scrollable
class does), but it will allow for vertical and horizontal scrolling:https://play.tailwindcss.com/Err1qC6lkh
Hope it helps!