In chrome devtools responsive (375px) i have this:
<div className="w-screen overflow-x-auto">
<div className="grid grid-cols-[repeat(7,_100px)] bg-blue-200">
<div className="sticky left-0 bg-green-200">col1</div>
<div>col2</div>
<div>col3</div>
<div>col4</div>
<div>col5</div>
<div>col6</div>
<div>col7</div>
</div>
</div>
why is it that when i get to the 5:th column when scrolling in the x dimension that column starts to push col1 out of the viewport? 🤔
2
Answers
Here is the snippet without the tailwind stuff.
Here is a duplicate of your question:
Your problem is the lack of "width: max-content" on the grid container, the link above would describe this way better than me