I am facing an issue with a seat map that can vary in width, ranging from 20 seats to 200. Due to this uncertainty, I want to make the seat map 80% wide and horizontally scrollable, regardless of its actual width.
My attempts to achieve this by setting:
overflow-x: auto;
white-space: nowrap;
and also:
overflow-x: scroll;
overflow-y: hidden;
have not been successful so far.
If you'd like to see the problem for yourself, you can check out this fiddle with the code: https://jsfiddle.net/ywzb365t/
The specific div I need to be horizontally scrollable is identified as #seat-map
.
You may notice the issue when resizing the window horizontally – if I don't make it 100% wide and horizontally scrollable, the seat rows become jumbled up.
I believe it's just a small detail that I'm missing, but I haven't been able to figure it out myself. Any assistance would be greatly appreciated.