Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Untitled
.codeblock {
width: 600px;
height: 200px;
background-color: yellow;
display: block;
}
.lineno {
background-color: #ddd;
width: 60px;
}
.code {
background-color: #ccc;
overflow: auto;
text-align:left;
}
.code pre {
overflow: auto;
}
<table class="codeblock">
<tr>
<td class="lineno">
<pre>
1
2
3
</pre>
</td>
<td class="code">
<pre>
a realy long line that needs to get overflowed a realy long line that needs to get overflowed
Another line that needs overflow Another line that needs overflow Another line that needs overflow
and a normal one
</pre>
</td>
</tr>
</table>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment