Make a group behave like a floating group via css after condition

Implementation is here. what I want to achieve is sth like the left filters group here (see pic also).

I have a RED group and an (initially hidden) BLUE floating group (blue-FG). I also have a repeating group (RG).
What I want is:
once the FG appears I want the RG to not scroll upwards anymore (i.e. I want it to behave like a floating group). I have tried two things (in a private implementation), but none is fully satisfying:

  1. hide the RG and add another RG inside a new left-floating group.
  2. set a dynamic margin of the RG. however, this means that every time the user scrolls, the margin changes and this produces some small movements of the RG that do not look good

the ideal solution would be to set the position of the RG relative to the FG once the FG appears. but I do not know how to do this.

do you have any idea?

@adamhholmes this is related to the previous post that I implemented but did not fully satisfy me (point 2 above)

anyone has any idea on this one?

Maybe this is what you’re after?

1 Like

What you need is some css. You can use this code:

#float-top { position: -webkit-sticky !important; position: sticky !important; top: 0px !important; }

Or use this plugin Float a' Element Plugin | Bubble built by @boston85719

2 Likes

There are a few ways to do it…

Here are two simple ways:

Using pure vanilla Bubble, duplicating the groups you want to become sticky, and turning them into floating groups… then, at a certain scroll position just hide the regular groups and show the sticky groups using conditions: (this method requires duplicating elements, but avoids having to use any custom CSS)

Vanilla Bubble (bubbleapps.io)

Or…

As already mentioned in this thread, you can add some custom CSS to your elements to make them sticky at certain scroll positions (this is probably cleaner and simpler, although both methods produce the same results):

CSS (bubbleapps.io)

1 Like

thank you @lantzgould @oliviercoolen and @adamhholmes (and @rico.trevisan ). each one of your solutions is what I was looking for and saved me a lot of time. amazing what you guys do for the community, thanks again

This topic was automatically closed after 70 days. New replies are no longer allowed.