When the code exceeds the width of the browser window, the div containing the code (class="file-lines") is put below the div with the line numbers (class="line-number").
Suggested solution:
Put the CSS style display: table-cell instead of display: inline-block for the line-numbers and file-linesdivs.
Put the CSS style display: table-row for the div that contains them both and is contained by the <div class="code">
Put the CSS style display: table for the outermost <div class="code">
I would also suggest adding text-align: right for the line-numbers div, but that's a matter of taste.
When the code exceeds the width of the browser window, the
div
containing the code (class="file-lines"
) is put below thediv
with the line numbers (class="line-number"
).Suggested solution:
display: table-cell
instead ofdisplay: inline-block
for theline-numbers
andfile-lines
div
s.display: table-row
for thediv
that contains them both and is contained by the<div class="code">
display: table
for the outermost<div class="code">
I would also suggest adding
text-align: right
for theline-numbers
div, but that's a matter of taste.I tested that, and it solved the problem.