P
P
Petr Volkhanov2018-02-16 17:29:59
css
Petr Volkhanov, 2018-02-16 17:29:59

How to make the sidebar 100% of the height of the site so that the footer goes under the main content?

How to make the sidebar 100% of the height of the site so that the footer goes under the main content? I use bootstrap

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
mr_dev1l, 2018-02-16
@mr_dev1l

in bootstrap 4, by default, this is implemented, since they use flex on row by default

O
Orkhan Hasanli, 2018-02-16
@azerphoenix

The sidebar has nothing to do with it.
See here - https://getbootstrap.com/docs/4.0/examples/sticky-...

A
Alexander null, 2018-02-16
@snikes

Why do you need to connect bootstrap for a couple of lines?
example

<html>
<head>
<style>
  body{height:100%; margin:0;}
  .sidebar{height:100%; display: inline-block; background: red; width:300px;vertical-align:top;}
.content{width: calc(100%  - 300px); display:inline-block; background:#eee; height:100%;}
footer{height:100px; background: #aaa;}
</style>
</head>
<body>
 <div class="sidebar">sidebar</div><div class='content'>content</div>
<footer>footer</footer>
</body>
</html>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question