Spaces:
Running
Running
Commit ·
5017b6c
1
Parent(s): 352fc29
Fix sticky table header to stay visible when scrolling
Browse files- Increased thead z-index from 10 to 100 for better stacking
- Increased model column z-index from 11 to 101
- Added box-shadow to header for better visual separation when floating
- Header now stays at top of viewport during page scroll
- index.html +2 -2
index.html
CHANGED
|
@@ -111,10 +111,10 @@ h1{font-size:clamp(20px,3vw,36px);font-weight:800;line-height:1.1;letter-spacing
|
|
| 111 |
/* TABLE */
|
| 112 |
.tw{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow-x:auto;box-shadow:var(--shadow);margin-bottom:20px;}
|
| 113 |
table{width:100%;border-collapse:collapse;font-size:11px;}
|
| 114 |
-
thead{background:var(--surface-alt);position:sticky;top:0;z-index:
|
| 115 |
thead tr{border-bottom:2px solid var(--border);}
|
| 116 |
th{padding:12px 8px;text-align:center;font-size:11px;font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);white-space:nowrap;cursor:pointer;user-select:none;vertical-align:bottom;line-height:1.6;font-weight:700;transition:var(--tr);}
|
| 117 |
-
th.c-model{text-align:left;padding-left:14px;min-width:180px;position:sticky;left:0;background:var(--surface-alt);z-index:
|
| 118 |
th:hover{color:var(--ac);background:rgba(99,102,241,.03);}
|
| 119 |
th.sorted{color:var(--ac);font-weight:800;}
|
| 120 |
.sa{opacity:.6;font-size:7px;margin-left:3px;}
|
|
|
|
| 111 |
/* TABLE */
|
| 112 |
.tw{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow-x:auto;box-shadow:var(--shadow);margin-bottom:20px;}
|
| 113 |
table{width:100%;border-collapse:collapse;font-size:11px;}
|
| 114 |
+
thead{background:var(--surface-alt);position:sticky;top:0;z-index:100;box-shadow:0 2px 4px rgba(0,0,0,0.1);}
|
| 115 |
thead tr{border-bottom:2px solid var(--border);}
|
| 116 |
th{padding:12px 8px;text-align:center;font-size:11px;font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);white-space:nowrap;cursor:pointer;user-select:none;vertical-align:bottom;line-height:1.6;font-weight:700;transition:var(--tr);}
|
| 117 |
+
th.c-model{text-align:left;padding-left:14px;min-width:180px;position:sticky;left:0;background:var(--surface-alt);z-index:101;}
|
| 118 |
th:hover{color:var(--ac);background:rgba(99,102,241,.03);}
|
| 119 |
th.sorted{color:var(--ac);font-weight:800;}
|
| 120 |
.sa{opacity:.6;font-size:7px;margin-left:3px;}
|