Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Content-first table-display test
<!DOCTYPE html>
<title>Table Display test</title>
@media screen and (min-width: 30em) {
body {
display: table;
caption-side: top;
[role="navigation"] {
display: table-caption;
[role="navigation"] ol {
display: table-row;
[role="navigation"] ol li {
display: table-cell;
padding: 0 1em;
<div role="main">
<p>This is the main content.</p>
<nav role="navigation">
<p>This is the navigation.</p>
<li><a href="#">foo</a></li>
<li><a href="#">bar</a></li>
<li><a href="#">baz</a></li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment