Answer the question
In order to leave comments, you need to log in
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
in bootstrap 4, by default, this is implemented, since they use flex on row by default
The sidebar has nothing to do with it.
See here - https://getbootstrap.com/docs/4.0/examples/sticky-...
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 questionAsk a Question
731 491 924 answers to any question