This topic has come up quite a few times since the new responsive engine was released, so until Bubble provides a way to do this, here are a couple approaches:
-
Regular group centered inside transparent full-width floating group
(Here’s a bit more info) -
Center the actual floating group with just a single CSS property
The second approach requires fewer elements and less CSS than the first approach and simply involves adding margin-left: auto;
to the floating group’s style. The only real drawback is that it won’t appear centered in the editor.
Also, if the FG is set to horizontally align to the right in the Bubble editor (default is left), then the CSS would be margin-right: auto;
. I suppose both could be added along with !important
to cover all the bases, but I like to keep things simple.
If anyone knows of any other techniques, please share.