A
A
Alexey Verkhovtsev2018-09-19 17:18:24
css
Alexey Verkhovtsev, 2018-09-19 17:18:24

How to stretch the sidebar to full height using flexbox?

Briefly, the markup is

<div class="wrapper">
  <header>Header</header>
  <main>
    <nav>Navigation</nav>
    <article>Content</article>
  </main>
</div>

I want the nav to stretch to the full height of the browser window. You can set position: absolute in the old fashioned way, but you need it on flex. Thanks in advance
PS Without vh, because. they still have poor browser support

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
az4, 2018-09-19
@az4

nav {
height: 100vh;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question