Skip to content

Instantly share code, notes, and snippets.

@Codyzhao
Last active September 14, 2019 11:12
Show Gist options
  • Save Codyzhao/62519e3ccd47e912edc4d7c2cd1c5499 to your computer and use it in GitHub Desktop.
Save Codyzhao/62519e3ccd47e912edc4d7c2cd1c5499 to your computer and use it in GitHub Desktop.
Untitled
body {
padding: 2em;
}
.wrapper {
display: flex;
/*
flex-direction: row;
flex-wrap: wrop;
*/
flex-flow: row wrap;
font-weight: bold;
text-align: center;
}
.wrapper > * {
padding: 10px;
/*
flex-grow: 1;
flex-shrink: 1;
flex-basis: 100%;
*/
flex: 1 100%;
}
.header {
background: tomato;
}
.footer {
background: lightgreen;
}
.main {
flex: 3;
/*
flex-grow: 3;
flex-shrink: 1;
flex-basis: 0%;
*/
order: 2;
min-height: 450px;
text-align: left;
background: deepskyblue;
}
.aside {
/*
flex-grow: 1;
flex-shrink: 0;
flex-basis: 0;
*/
flex: 1 0 0;
}
.aside-1 {
background: gold;
order: 1;
}
.aside-2 {
order: 3;
background: hotpink;
}
.footer { order: 4; }
<div class="wrapper">
<header class="header">Header</header>
<article class="main">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
</article>
<aside class="aside aside-1">Aside 1</aside>
<aside class="aside aside-2">Aside 2</aside>
<footer class="footer">Footer</footer>
</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment