Making position: sticky work inside a CSS grid
You can apply position: sticky; to a column of a two-column CSS grid without anything getting in your way. The catch is the column's height: grid columns default to align-items: stretch;, so each one grows as tall as the tallest content in either column.
The practical result is that a sticky column with short content will not appear to move — it is already as tall as its neighbor, so there is no slack for it to travel through.
Ahmad Shadeed points out that the fix is likely to set align-items: start; on the column you want to behave as sticky.
One addition worth keeping in mind: when the element you want to stick lives inside one of the columns rather than being the column itself, you should leave the default stretch behavior in place.



