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:
@@ -614,6 +614,11 @@ table th {
|
|||||||
border-bottom: 2px solid var(--accent);
|
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) {
|
table tr:nth-child(even) {
|
||||||
background: var(--table-even);
|
background: var(--table-even);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -757,6 +757,18 @@ table th {
|
|||||||
border-bottom: 2px solid var(--accent);
|
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) {
|
table tr:nth-child(even) {
|
||||||
background: var(--table-even);
|
background: var(--table-even);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -57,7 +57,7 @@ if ($callsignLookupSvc == "QRZ") { $callsignLookupUrl = "https://www.qrz.com/db/
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<b><?php echo $lang['last_heard_list'];?></b>
|
<b><?php echo $lang['last_heard_list'];?></b>
|
||||||
<table>
|
<table class="log-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th><a class="tooltip" href="#"><?php echo $lang['time'];?> (<?php echo date('T')?>)<span><b>Time in <?php echo date('T')?> time zone</b></span></a></th>
|
<th><a class="tooltip" href="#"><?php echo $lang['time'];?> (<?php echo date('T')?>)<span><b>Time in <?php echo date('T')?> time zone</b></span></a></th>
|
||||||
<th><a class="tooltip" href="#"><?php echo $lang['mode'];?><span><b>Transmitted Mode</b></span></a></th>
|
<th><a class="tooltip" href="#"><?php echo $lang['mode'];?><span><b>Transmitted Mode</b></span></a></th>
|
||||||
|
|||||||
Reference in New Issue
Block a user