Left-align log-table headers to match their left-aligned data cells

Last Heard (and other log-style tables sharing this pattern) render
every <td> with align="left", but headers inherit the sitewide
table { text-align: center; } with nothing overriding it - so the
caption drifts toward the middle of wide columns (most visible on
Target) while the actual data underneath hugs the left edge. Looks
like a column-boundary misalignment at a glance, but it's a text-align
mismatch; measured actual cell boundaries and they line up exactly.

Scoped via a new .log-table class rather than changing table th
sitewide, since ~90% of the dashboard's other tables intentionally
keep centered cells (only 6-7 files use align="left" data cells).
This commit is contained in:
2026-07-21 15:43:26 +08:00
parent e8a569a7e4
commit 2bc8f7b03e
3 changed files with 18 additions and 1 deletions
+5
View File
@@ -614,6 +614,11 @@ table th {
border-bottom: 2px solid var(--accent);
}
/* See css/pistar-css.php for why this is scoped to .log-table only. */
table.log-table th {
text-align: left;
}
table tr:nth-child(even) {
background: var(--table-even);
}
+12
View File
@@ -757,6 +757,18 @@ table th {
border-bottom: 2px solid var(--accent);
}
/* Log-style tables (Last Heard, Local TX, D-Star activity lists) render
every data cell with align="left"; headers inherit the sitewide
`table { text-align: center; }` though, so the caption visually
drifts away from its column's actual left-aligned content - most
noticeable on wide columns like Target. Left-align just these
headers rather than changing text-align sitewide, since the vast
majority of the dashboard's other tables (config grids, status
tables) intentionally keep centered cells. */
table.log-table th {
text-align: left;
}
table tr:nth-child(even) {
background: var(--table-even);
}