/* Placement */ @media screen and (max-width: 800px) { body { grid-template: "header" auto "nav" auto "main" 1fr "footer" auto / 1fr; } } @media screen and (min-width: 800px) { body { grid-template: "header header" auto "nav main " 1fr "footer footer" auto / 200px minmax(600px, auto); } } body { display: grid; margin: auto; max-width: 1224px; grid-gap: 0; } header { grid-area: header; } nav { grid-area: nav; } main { grid-area: main; } footer { grid-area: footer; } /* Style */ body { background-color: #c0dee2; font-family: helvetica, sans-serif; } header > h1 { font-size: 18pt; text-align: center; padding: 0; margin: 4px; } nav h2 { font-size: 14pt; font-weight: normal; margin: 0 8px 0 0; padding: 8px 16px; background-color: #eee; } nav ul { list-style-type: none; margin: 0 0 8px 0; padding: 0; } nav li a { display: block; color: #000; background-color: #fff; padding: 8px 16px; margin: 0 8px 0 0; text-decoration: none; font-size: 12pt; } nav li a:hover { background-color: #ccc; } main { background-color: #eee; } footer { text-align: center; } table { display: grid; width: 100%; grid-auto-flow: row; } thead, tbody, tr { display: contents; } th { font-size: 14pt; font-weight: normal; text-align: left; } th, td { padding: 8px; } .details { max-height: 0; padding: 0px 8px 0px 8px; overflow-y: hidden; transition: all 0.15s cubic-bezier(0, 1, 0, 1); } .details-visible { padding: 8px; max-height: 600px; transition: all 0.15s ease-in-out; } tr:nth-child(2n + 1) td { background-color: #fff; }