How to place the elements of a list at the bottom of an absolute positioned parent element
Suppose you have a HTML-list and you want to place its elements at the bottom of a parent element which is positioned absolute in your website and also has a predefined height. Apart from that you also want the list to be scrollable, when not all elements can be shown inside the parent element.
Consider the following HTML code which solves these two problems:
and the following CSS code:
As you can see the trick to hold the list, or every other HTML element you want to use, on the bottom of a parent div is to use the combination of display: table-cell and *vertical-align: bottom properties.
The inner element should not be set to an absolute position and also it has to have the same height as its parent element.
Moreover, we made the list scrollable by defining the overflow-y: auto property on the parent element, which shows a vertical scrollbar when not all the elements of the list can be shown.
Consider the following code example from my GitHub repository which explains the previous.