Center element in a group when other elements are hidden

Hi forum!
I have a group containing two buttons, the one on the right is conditionally visible.
image
How can I center the left button in relation to the parent group when the other one is hidden?

I’ve always had to add a third button (centered in the group) and hide it when both buttons are visible. Then just have the buttons call the same custom event. Not ideal, but I don’t know anything in the responsive settings to handle this. You could probably do some css tricks as well.

If there is a cleaner way to do it, I’m guessing @fayewatson would know. :slight_smile:

2 Likes

This is a good question. I wish there was a bit more control on the horizontal aspects of the design when conditions are applied, in the same way we have more flexibility with vertical elements collapsing.

It doesn’t appear any options are available to center elements when a parent element within a group is hidden. As you can see from the screenshot, although the element is hidden, it still acts as if the element is indeed visible:
image

I could be wrong, maybe a option exists to center, but I haven’t come across such option, hope I’m wrong :wink:

Anyhow best method in the meantime is to expose ID of elements, so you can click the button element or group element depending where the condition is on the right button and then on the condition, you can add a ID attribute e.g.
image

And some custom CSS to the page and job done.

1 Like

@mebeingken That’s the only Bubble way I know of too! :slight_smile:

I have to better investigate your solutions, I haven’t understood them well yet.
I just hoped an option existed and I overlooked it.

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