cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

9920453a15c1d46ab5ad95b66fcee539fac87ac2

verified · cmc

author: Christian Cleberg <hello@cleberg.net> · 2026-03-11T05:32:20Z

prevent tables from overflowing
 theme/static/styles.css | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/theme/static/styles.css b/theme/static/styles.css
index 190b454..5b56d7d 100644
--- a/theme/static/styles.css
+++ b/theme/static/styles.css
@@ -490,7 +490,19 @@ blockquote::after {
 /* ============================================================
    TABLES
    ============================================================ */
-table { width: 100%; border-collapse: collapse; margin: 2rem 0; }
+table {
+  display: block;
+  width: 100%;
+  max-width: 100%;
+  overflow-x: auto;
+  border-collapse: collapse;
+  margin: 2rem 0;
+}
+
+table td, table th {
+  white-space: nowrap;
+  padding: 0.5rem 1rem;
+}
 th, td {
   border-bottom: 1px solid var(--border-soft);
   padding: 0.65rem 0.75rem;