dsimon24cx's avatar

Tile is not scrolling as it should

Good morning.

I am despairing with TailwindCSS right now.

https://play.tailwindcss.com/g90AI9khLp

The tile visible behind the link should be able to scroll up and down. But the tile should not scroll to the right and left. I just can't find the place why the tile can also scroll to the right and left. Do you have any idea what is not correct there?

Greetings.

0 likes
3 replies
tykus's avatar

What tile? I can't square the description above with the example you linked

dsimon24cx's avatar

By tile I mean the entire area you can see in the example. On the main page there were several of these areas, so I called it a tile. The bottom line is what you see in the example. This can be scrolled. Down and up. But mistakenly also to the side.

Sinnbeck's avatar

@dsimon24cx You have negative margin which forces the div to fill more that it would normally do

<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">

Remove that negative margin, and it should work

1 like

Please or to participate in this conversation.