JSFiddle - React, Tailwind, and code Playground
flexbox header-main-footer
by CBroe
HTML
<header>
<h1>
Header
</h1>
</header>
<main>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<a href="#more-1" id="more-1" class="expand">More</a> <a href="#less-1" id="less-1">Less</a>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
</main>
<footer id="footer">
<p>
Footer
</p>
</footer>
CSS
* { margin:0; padding:0; box-sizing:border-box; }
body { display:flex; flex-direction:column; max-width:40em; min-height:100vh; margin:auto; background:#ff9; }
body > header, body > main, body > footer { margin:0 6vw; padding:4vw; /*outline:1px dashed red;*/ background:#ccc; }
body > main { flex:1; padding-top:4vw; padding-bottom:4vw; background:#ddd; }
@media screen and (min-aspect-ratio: 1/1) {
body { background:blue; }
body > header, body > main, body > footer { margin:0 6vh; padding:4vh; }
body > main { padding-top:4h; padding-bottom:4h; }
}
.expand + a ~ * { display:none; }
.expand:target + a ~ * { display:block; }