dev10
1
Hi all,
Sorry if this question has already been asked, but is there a way to do (in native/vanilla Bubble, without adding JS) to allow horizontal scrolling when content overflows for a group?
It exists for vertical scrolling in the new responsive engine, but is there the same thing for horizontal?
Thanks!
3 Likes
I think I solved the problem with the same code.
I used 2 groups - one fixed with the size to fit everything and the second can variate with the page:
1 - the first group should be fixed (it can be a row) and he goes inside the second.
2 - the second group is the one that you need to expose the html and place something (in mt case i used “scroll”). this group should variate the size with the page.
3 - place a html in the page and type the code :
\<style>
#scroll{
overflow-x: scroll !important;
}
<\style>\
(OBS: remove the bars “\” in the code at the beginning and at the end)
4 - create a condition on the html element “when the current page width > {size of the fixed group} then clean the html” if you don’t do this the scrollbar will be always visible even if the page is much bigger than the fixed group.
5 - And the container alignment of the second group should be left-aligned. create a condition: “when the current page width > {size of the fixed group} then container alignment is centered”
4 Likes
We can remove steps 4 and 5 by replacing “scroll” by “auto”.
#scroll{
overflow-x: auto !important;
}
<\style>
1 Like
Hey I’m struggling to understand this. Is the first group an html element? or where do I put the html?
Can this be done within a RG?
EDIT: Yes it can.
1 Like
data1
9
I am having partial success with this.
In relationship to this other post: Horizontal Scroll for Group with RG inside as Table - #4 by data1 , I tried your method but and here is what I have so far:
When the content of my horizontal scroll group has a FIXED width that will beyond the screen width, then I get the horizontal scrollbar 
However, in my case I don’t want a fixed width, the content could vary in width (because my content would be a table with a varying number of columns).
So when I set “fit width to content” on the text and on the group containing the text, I would expect the text to stretch all the way out outside the horizontal scroll group and the scroll bar appearing. Yet, what I get is the text wrapping again…
How can I make my content of variable width AND get the horizontal scrollbar when this width is wider than the screen size?