Avoid Section to break and add horizontal scrollbar
I don't want my section to break and instead add a horizontal scrollbar, but I can't get this to work.
I tried to add overflow-auto like so
15 Replies
I tried to add overflow-auto like soThat's probably the wrong place, as you want the section content to be scrollable. Not the whole section.
Sure I want the whole section to be scrollable, but can't prevent the columns to break. So I want the section to be full width.
Wait, columns? Can you share a screenshot?
And where is the issue? When you resize?
Can you share more of your code?
Everything breaks into the next line
This is probably not related to overflow but because it’s a grid/flex that is set to one column on smaller viewports?
but I set the section columns to 8.
I got it to work now with
now the columns don't break anymore. But now the problem is the columns shrink, need to prevent this.
Yeah, but the default for small viewports is 1
I somehow need to preserve the width for the columns
You break the columns by passing an array of sizes to the modifier.
``php
[
‘default’ => 1,
‘sm’ => 2,
‘md’ => 4,
‘lg’ => 8,
‘xl’ => null,
]
```
The null is necessary to keep them at 8 above lg in this example.
Somehow this does not work
How to preserve the width of the columns so, that they are not overlapping
I want to preserve exaclty this layout for small devices. So that they have to use the scrollbar to go to the right.
Why don't you use a table? Then it will do what you want by default.
Solved it by using a different layout. Thank you guys