Skip to content

Instantly share code, notes, and snippets.

@meyerweb
Created August 1, 2013 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meyerweb/6132996 to your computer and use it in GitHub Desktop.
Save meyerweb/6132996 to your computer and use it in GitHub Desktop.
Untitled
section {margin: 2em 0; border: 2px dotted red;}
section div:first-child {background: silver;}
section div:last-child {background: cyan;}
section#flexbox {display: flex;}
section#flexbox div {flex: auto; width: auto;}
section#display {display: table;}
section#display div {display: table-cell;}
<!-- content to be placed inside <body>…</body> -->
<section id="flexbox">
<div>This is a div.</div>
<div><ul><li>This is…</li><li>…another div with…</li><li>…a list.</li></ul></div>
</section>
<section id="display">
<div>This is a div.</div>
<div><ul><li>This is…</li><li>…another div with…</li><li>…a list.</li></ul></div>
</section>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment