Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

1 Answer

+1 vote
by

Normally there should be a  <code>  tag inside of the  <pre>  tag, like this:

<pre>
    <code></code>
</pre>

Then the scrollbar would appear automatically. But since your editor doesn't append a  <code>  tag, you can add the scroll auto to the  <pre>  tag instead.

Go to Admin > Theme Options > CSS Styles and paste the following:

.entry-content pre,
.qa-q-view-content pre,
.qa-a-item-content pre,
.qa-c-item-content pre {
    overflow: auto;
}

by
Thank you @gold-developer. It did work for larger screens but for some reason isn't working for ver small ones. The below one worked fine - is it safe to use this?

.entry-content pre, .qa-q-view-content pre, .qa-a-item-content pre, .qa-c-item-content pre {
    white-space: pre-wrap !important;
}
...