Join Nostr
2024-07-29 18:26:45 UTC

Tom Walker on Nostr: #css This is nowhere on Stack Overflow (that I can see) so I'll put it here. This is ...

#css

This is nowhere on Stack Overflow (that I can see) so I'll put it here.

This is how to stop your page from scrolling horizontally without resorting to JS nonsense.

html, body {
max-width: 100%;
overflow-x: hidden;
position: relative; /* this is the one everyone misses out! */
}

The problem is that you have some position: absolute element poking out. position: relative at root level forces a 'container'.