Skip to content

Commit

Permalink
Make each of the three columns on the GitHub Pages page individually …
Browse files Browse the repository at this point in the history
…scrollable (#561)

* Ensure the result can be scrolled independently from the source

* Make columns of demo page individually scrollable

---------

Co-authored-by: codebymikey <9484406+codebymikey@users.noreply.github.com>
  • Loading branch information
ExplodingCabbage and codebymikey committed Sep 16, 2024
1 parent 913b232 commit db3992d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ <h1>Diff</h1>

<table>
<tr>
<td contenteditable="true" id="a">restaurant</td>
<td contenteditable="true" id="b">aura</td>
<td><pre id="result"></pre></td>
<td><div contenteditable="true" id="a">restaurant</div></td>
<td><div contenteditable="true" id="b">aura</td>
<td><div><pre id="result"></pre></div></td>
</tr>
</table>

Expand Down
9 changes: 6 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ body {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html, body, table, tbody, tr, td {
html, body, table, tbody, tr, td, td div {
height: 100%
}
table {
table-layout: fixed;
width: 100%;
}
td {
width: 33%;
box-sizing:border-box;
width: 33.3333%;
padding: 3px 4px;
border: 1px solid transparent;
vertical-align: top;
}
td div {
overflow: auto;
font: 1em monospace;
text-align: left;
white-space: pre-wrap;
Expand Down

0 comments on commit db3992d

Please sign in to comment.