Flexbox with Position Sticky
HTML
<div class="flexbox-wrapper">
<div class="regular">
This is the regular box
</div>
<div class="sticky">
This is the sticky box
</div>
</div>
CSS
.flexbox-wrapper {
display: flex;
height: 500px;
overflow: auto;
}
.regular {
background-color: blue;
height: 600px;
}
.sticky {
position: -webkit-sticky;
position: sticky;
top: 0;
align-self: flex-start;
background-color: red;
}