Thursday, June 10, 2021

How to position a div at the bottom of the parent div?

Assign position:relative to #container, and then position:absolute; bottom:0; to #copyright.

#container {

    position: relative;

}

#copyright {

    position: absolute;

    bottom: 0;

}

<div id="container">

  <!-- Other elements here -->

  <div id="copyright">

    Copyright Foo web designs

  </div>

</div>



references:

https://stackoverflow.com/questions/526035/how-can-i-position-my-div-at-the-bottom-of-its-container



No comments:

Post a Comment