position:sticky inside table cell
HTML
<table class="parent-table">
<tr>
<td class="position-first-child-sticky">
<div>
I'm first-child-sticky
</div>
</td>
</tr>
</table>
CSS
.parent-table{
height:1000px;
width:200px;
}
.parent-table td{
vertical-align:top;
}
.position-first-child-sticky{position:relative;}
.position-first-child-sticky > :first-child{
position:-webkit-sticky;
position:sticky;
top:0;
background:rgba(255,220,200,0.5);
}
JavaScript
x