Want to align buttons perfectly in Flatsome? This quick guide shows you how to position two buttons side by side on desktop, and stack them vertically on mobile for a clean, responsive look. Let’s get started!
Steps to Align Buttons with the Stack Element
1. Add Two Buttons in UX Builder
- Open your page in UX Builder.
- Place two buttons next to each other in the workspace. This layout is great for desktops but may need adjustments for mobile.
2. Use the Stack Element for Better Responsiveness
- Click the plus icon (+) in UX Builder.
- Search for Stack Element and add it to your layout.
- Drag your button elements into this Stack Element.
3. Adjust Button Spacing
- Once the buttons are inside the Stack Element, set the spacing to 0.5 or whatever spacing looks best.
- This will make sure they’re close but not touching.
4. Center Align the Buttons
- With both buttons selected in the Stack Element, set their alignment to center.
- This keeps the layout neat and visually centered on the page.
5. Configure the Mobile Layout
- In the Stack Element settings, adjust the layout direction for mobile to vertical. This will stack the buttons one on top of the other when viewed on mobile.
- This is essential for mobile users, ensuring the buttons are easy to access and look clean on smaller screens.
6. Optional: Adjust Button Width for Mobile
- If you want the buttons smaller on mobile, place the Stack Element inside a new row and column.
- Resize the column width as needed (e.g., 10 or 11) to make the buttons narrower.
And that’s it! Now your buttons are aligned side-by-side on desktop, and vertically on mobile with a responsive, user-friendly layout.
Continue learning
Need a custom design? Hire Seb today
Get the #1 All In One Design Agency for Flatsome