3

I have a website hosted on Github Pages, using Jekyl with the Lanyon theme. However, no matter how I fiddle with the CSS, I can't seem to get the code blocks to have a horizontal scroll bar. By default they wrap, and I was able to get the text to extend beyond the box, but I can't get a scroll bar.

The first code block on this page has several lines that wrap: http://nicktobey.me/2015/07/29/monads/

I tried every suggestion at How to support scrolling when using pygments with Jekyll, but none of them worked.

Community
  • 1
  • 1
Nick Tobey
  • 111
  • 1
  • 1
  • 4

1 Answers1

2

With Jekyll 3.4.0 and Poole, Lanyon, I was able to get the horizontal code scrolling right by adding the following CSS:

pre.highlight {
    word-wrap: normal;
    overflow-x: auto;
    white-space: pre;
}
MartinW
  • 4,966
  • 2
  • 24
  • 60