Here's a screenshot of the problem.
Basically, when the scrollbar shows up for the y-axis, the width of the container doesn't expand. Instead it just creates a scrollbar for the x-axis.
How can I get the container to expand without creating the x-axis scrollbar?
The easy fix is to use width: 100% instead. Percentages don't include the width of the scrollbar, so will automatically fit. If you can't do that, or you're setting the width on another element, add overflow-x: hidden or overflow: hidden to the surrounding element to prevent the scrollbar.
you can give this a try for the element:
overflow-x: hidden;
overflow-y: auto;
you can use scroll
or auto
for the overflow-y
here is a page with some samples: http://www.brunildo.org/test/Overflowxy2.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With