1

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.

danimacs
  • 13
  • 5

2 Answers2

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