I'm currently working on a WordPress site (it's currently in development, can't share a link at the moment). I'm putting code, like htaccess rules in a Post for my Blog. I'm wrapping the code with:
<pre><code>some htaccess rules here</code></pre>
This is so that it appears in it's own box. Since the class for Posts is
.single
, I'm using the following to try and show a horizontal scroll bar if the line of code is too long.
.single pre {
overflow-x:scroll;
}
.single pre code {
white-space: pre;
}
In the latest version of Chrome, just the blank bar appears with no scrollable bar. In the latest version of Firefox, sometimes the scrollable bar appears and other times, just the blank bar appears and no scrollable bar like it does in Chrome.
Not sure what I'm doing wrong.
Thanks for any advice in advance.