A
A
Arthur Levenson2020-02-23 12:19:50
css
Arthur Levenson, 2020-02-23 12:19:50

How to push the navbar to the bottom?

Can you please tell me the best way to press the navbar to the bottom?

5e52436a5ac88870071667.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor, 2020-02-23
@kiskiskit

Right off the bat, I have two solutions:
1) We make the navbar position fixed and position it from the bottom, and set the bottom padding on the navbar height to the body or another block (as it will be according to the markup).
2) do something like this

<div class="wrap">
    <div class="content">Пустое серое пространство</div>
    <nav class="navbar">Навбар</nav>
</div>

and css
.wrap {
min-height: 100vh;
display: flex;
flex-direction: column
}

.content {
flex: 1
}

.navbar: {
height: /*высота*,
/* другие стили */
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question