S
S
softshape2018-02-07 12:39:07
css
softshape, 2018-02-07 12:39:07

How to make a proper Holy Grail Layout with scrolling on Flexbox?

There are different layout options "navigation + content + footer" on flex, for example - https://gridlayout.io/demos/holy-grail.html a lot and vertical scrolling should appear in it. Instead, the whole layout just goes down in height, and scrolling does not appear.
What needs to be changed so that it does not change its height, but goes into scrolling if necessary?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
softshape, 2018-02-07
@softshape

main {
   flex: 2;
   overflow: auto;
}

O
Odisseya, 2018-02-07
@Odisseya

Fix height and allow scrolling:

main {
    height: 100vh;
    overflow-y: auto;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question