How can I put the footer at the end of the page, but I don't mean sticking to the end of the window with the position, but rather this end of the page even though there is space above it. A solution with bootstap also helps me.
Asked
Active
Viewed 74 times
1
-
Can you post some code, some attempt? – Dean Coakley May 18 '20 at 23:43
-
Does this answer your question? [How to keep footer at bottom of page?](https://stackoverflow.com/questions/17783937/how-to-keep-footer-at-bottom-of-page) – Dean Coakley May 18 '20 at 23:45
-
take your pick: https://css-tricks.com/couple-takes-sticky-footer/ – Jon B May 18 '20 at 23:59
2 Answers
1
I made these codes for you. This could be an idea for you. This method is one they can use.
Html:
<div id="container">
<div id="main">
// Main Content
</div>
</div>
<footer class="footer">
// Footer content
</footer>
Css:
* {
margin:0;
padding: 0;
}
html,
body {
height: 100%;
}
#main {
overflow: auto;
padding-bottom: 100px;
}
#container {
min-height: 100%;
}
.footer{
background-color: black;
height: 100px;
margin-top: -100px;
clear:both;
}

CanUver
- 1,756
- 2
- 6
- 19
0
That link describe how to get your footer under control https://www.freecodecamp.org/news/how-to-keep-your-footer-where-it-belongs-59c6aa05c59c/
And example of solution with Bootstrap 4
<body class="d-flex flex-column min-vh-100">
<div class="wrapper flex-grow-1"></div>
<footer></footer>
</body>

Alyona Yavorska
- 569
- 2
- 14
- 20