]> git.ardis.lu - event-hashes/commitdiff
Scroll table on overflow
authorArdis Lu <ardisglu@gmail.com>
Sat, 6 Jan 2024 06:56:39 +0000 (22:56 -0800)
committerArdis Lu <ardisglu@gmail.com>
Sat, 6 Jan 2024 06:56:39 +0000 (22:56 -0800)
index.html

index 77b615864da0634e4e5b16a9143389c7527e407f..c96fdd0eaa13869ff251d57ed501f6afd5cbf111 100644 (file)
       border: 1px solid hsl(216deg 50% 80%);
     }
 
+    .table-container {
+      inline-size: calc(100dvi - 16px);
+      align-self: center;
+      overflow: auto;
+    }
+
     table {
       display: none;
       border-collapse: collapse;
-      overflow-x: auto;
-      align-self: center;
+      margin: auto;
     }
 
     tr {
     <label for="code">Solidity code</label>
     <textarea id="code" placeholder="event Transfer(address indexed _from, address indexed _to, uint256 _value)" autocomplete="off"></textarea>
 
-    <table>
-      <thead>
-        <tr>
-          <th><abbr title="Normalized event signature">Event</abbr></th>
-          <th>Keccak-256 Hash</th>
-        </tr>
-      </thead>
-      <tbody></tbody>
-    </table>
+    <div class="table-container">
+      <table>
+        <thead>
+          <tr>
+            <th><abbr title="Normalized event signature">Event</abbr></th>
+            <th>Keccak-256 Hash</th>
+          </tr>
+        </thead>
+        <tbody></tbody>
+      </table>
+    </div>
   </main>
 
   <footer>
This page took 0.053824 seconds and 4 git commands to generate.