Ideas on how to set a element over the top of my page

visual example

what I want to do, is a variable display of events based on the data from a realtime database. the list starts with the events that are upcoming (grey), and if the user scrolls up, then they will also see the past events (red).

i experimented with positioning, z-index and so on, but wasn’t able to come up with something, that would work for a dynamically generated amount of elements.