Having a div using display:flex
and position:relative
, I am looking to add an overlay element at the bottom of this div by applying position:absolute
to it. Ideally, the height of the overlay should be auto, but it's not necessary. The issue arises when scrolling the relative parent div, causing the absolute-positioned element to move along with it. How can I keep it pinned to the bottom?
Code
I am seeking a purely CSS solution.
Update 1: I have found a working solution: http://codepen.io/apreg/pen/gwBdJq