Skip to content

Instantly share code, notes, and snippets.

@adactio
Created August 16, 2011 10:36
Show Gist options
  • Save adactio/1148826 to your computer and use it in GitHub Desktop.
Save adactio/1148826 to your computer and use it in GitHub Desktop.
Content-first table-display test
<!DOCTYPE html>
<html>
<head>
<title>Table Display test</title>
<style>
@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;
}
}
</style>
</head>
<body>
<div role="main">
<p>This is the main content.</p>
</div>
<nav role="navigation">
<p>This is the navigation.</p>
<ol>
<li><a href="#">foo</a></li>
<li><a href="#">bar</a></li>
<li><a href="#">baz</a></li>
</ol>
</nav>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment