header-logo
Learn how to use Wix to build your site and business.
Design and manage your site using intuitive Wix features.
Manage subscriptions, plans and invoices.
Run your business and connect with members.
Learn to purchase, connect or transfer a domain to your site.
Get tools to grow your business and web presence.
Boost your visibility with SEO and marketing tools.
Get advanced features to help you work more efficiently.
Find solutions, learn about known issues or contact us.
placeholder-preview-image
Improve your skills with our courses and tutorials.
Get tips for web design, marketing and more.
Learn to increase organic site traffic from search engines.
Build a custom site using our full-stack platform.
Get matched with a specialist to help you reach your goals.
placeholder-preview-image

Studio Editor: Stacking Elements

6 min
In this article
  • Applying a stack
  • Changing the stack direction
  • Managing a stack
  • Designing a stack
  • Adjusting the stack layout
A stack is a flexbox container that "hugs" a group of elements – whether they are in a vertical or horizontal order. It ensures the elements stay in order, with the spacing you define, and never overlap. 
Having said that, you can use negative margins to make elements overlap intentionally.
Dealing with overlapping elements?
Review our troubleshooting video to learn what to check and how to resolve this issue. 

Applying a stack

Stacking elements is a quick way to organize your design with consistent spacing, creating a clean and polished layout. When selecting multiple elements that are next to each other (in the same parent element), the option to stack them pops up. 

To apply a stack:

  1. Go to your editor.
  2. Click an element that you want to be in the stack.
  3. Hold down the Shift key and select the other stack elements.
  4. Click Stack.
  5. (Optional) Drag the line between the elements to set margins.
Dragging the spaces between stack items to increase margins
Tip:
You can also create negative margins to make elements overlap intentionally. 
Dragging the stack margins to the opposite direction to create an overlap between the image and text

Changing the stack direction

When you stack elements, the direction is automatically determined by the order of the elements. If the elements are arranged vertically, for example, the stack will be vertical. 
Either way, you can always switch the direction using the drop-down. This automatically rearranges the elements so they're in the right order. 
An example of a horizontal stack turned to vertical, the elements are now in a vertical order

Managing a stack

You can customize the stack to match new content and requirements. Add more elements to the stack, move them around in a click of a button, and detach elements that are no longer needed. 

To manage a stack:

  1. Go to your editor.
  2. Select the relevant stack.
  3. Choose what to do next:

Designing a stack

The stack does not have to be transparent – you can design it to make the content stand out on the page. Add a background color, border and shadow. You can also make the stack corners more round or square. 

To design a stack:

  1. Go to your editor.
  2. Select the relevant stack.
  3. Click the Open Inspector icon  at the top right of the editor.
A screenshot of opening the Inspector panel in the Studio Editor.
  1. Use the available options under Design to customize the stack:
    • Set the background color and its opacity.
    • Add a border to frame the stack. 
    • Choose a radius for the corners.
    • Enable shadow and manage settings like its angle, distance, size, etc.
A screenshot of the inspector panel and a stack selected on the canvas, showing the design options

Adjusting the stack layout

Adjust the stack layout to ensure that every element is spaced, aligned, and padded in a way that suits your creative vision or client’s needs. 

To adjust the stack layout:

  1. Go to your editor.
  2. Select the relevant stack.
  3. Click the Open Inspector icon  at the top right of the editor.
A screenshot of opening the Inspector panel in the Studio Editor.
  1. Scroll down to Layout.
  2. Use the available options to adjust the stack layout:
    • Switch the direction from Horizontal to Vertical or vice versa.
    • Enter a value under Item spacing to create equal margins between the stack elements (i.e. items).
    • Choose an alignment for the stack items: Left, Right, Center or Justified.
    • Add padding to the sides. 
A stack on the canvas next to the Inspector panel, highlighting the layout section
Did you know?
You can adjust the padding and spacing directly on the canvas. Drag the line between elements, or double-click the line if you prefer entering a precise value. You can even switch the size unit if needed.