Understanding overflow-x and overflow-y in CSS
The overflow-x and overflow-y properties in CSS control how content that overflows a container is handled horizontally and vertically, respectively. They provide more precise control than the general overflow property, which affects both directions at once.
overflow-x – Manages overflow along the horizontal axis (left and right).
overflow-y – Manages overflow along the vertical axis (top and bottom).
You can use them together to create independent scroll behavior for each axis, such as allowing vertical scrolling but hiding horizontal overflow.