D
D
Dezosick2019-01-07 11:30:15
css
Dezosick, 2019-01-07 11:30:15

How to stretch the block to the height of the parent if the parent has 100VH?

The first screen should be 100vh (it has a header + menu + first section)
How to make the block (first-screen) occupy the entire remaining height if the height of the header and menu is unknown ???

<div class="parent">
  <div class="top-line"></div>
  <div class="menu"></div>
  <div class="first-screen"></div>
</div>

.parent {
  height: 100vh;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseny, 2019-01-07
@Dezosick

You need to use flex-box.
And the one that should take up the remaining space flex-grow: 10 [for example].

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question