MediaWiki: Tweeki.css
From Serenes Forest - A Fire Emblem Resource
Line 18: | Line 18: | ||
th { | th { | ||
padding: 0.25em; | padding: 0.25em; | ||
+ | } | ||
+ | |||
+ | td { | ||
+ | z-index: -2; | ||
} | } | ||
Line 26: | Line 30: | ||
background: #FFF; | background: #FFF; | ||
border-right: 1px solid #CCC; | border-right: 1px solid #CCC; | ||
+ | z-index: -1; | ||
} | } | ||
Line 34: | Line 39: | ||
background: #000; | background: #000; | ||
color: #FFF; | color: #FFF; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } |
Revision as of 13:35, 27 October 2020
.table { width: auto; height: auto; max-width: 100vw; max-height: 100vh; overflow: auto; position: relative; display: inline-block; } .table table { position: relative; border-collapse: collapse; margin: 0; } td, th { padding: 0.25em; } td { z-index: -2; } tr:nth-child(n+2) th { position: -webkit-sticky; /* for Safari */ position: sticky; left: 0; background: #FFF; border-right: 1px solid #CCC; z-index: -1; } tr:first-child th { position: -webkit-sticky; /* for Safari */ position: sticky; top: 0; background: #000; color: #FFF; }