Skip to content

Commit

Permalink
feat: sticky table headers
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Apr 7, 2024
1 parent 2e3b203 commit 7be831a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion darkstat/front/shared.templ
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ templ TabContent() {
padding-right: 5px;
}

table, tr,th, td, thead {
th, td {
border-width: 1px;
border-style: solid;
border-color: #D7D7D7;
}
table {
border-collapse: separate;
position: relative;
}
th {
border-color: #8B8B8B;
Expand All @@ -38,6 +43,11 @@ templ TabContent() {
&:hover {
background-color: #CCC;
}

background: #EFEFEF;
position: sticky;
top: 0; /* Don't forget this, required for the stickiness */

}
td {
border-color: #D7D7D7;
Expand Down

0 comments on commit 7be831a

Please sign in to comment.