Home > OS >  Combine a nav with sticky position in a layout with 100vh (child of) body element?
Combine a nav with sticky position in a layout with 100vh (child of) body element?

Time:06-08

In my page i prefer not to style the directly, but use a wrapper instead. Wrapper has min-height: 100vh. See the layout here: layout

CodePudding user response:

Use the min-h-screen with the body element instead and the rely on flexbox to extend the content

<script src="https://cdn.tailwindcss.com"></script>
<body >
  <nav >
    nav
  </nav>
  <div >
    <header >
      header
    </header>
    <main >
      main
    </main>
    <footer >
      footer
    </footer>
  </div>
</body>

  • Related