# Studio Editor: Working with an Advanced CSS Grid

Source: https://support.wix.com/en/article/studio-editor-working-with-an-advanced-css-grid (updated 2026-10-05)
Related: Wix developer documentation, https://dev.wix.com/docs/llms.txt; Help Center index, https://support.wix.com/en/llms.txt

In the Studio Editor, you can use an advanced CSS grid to organize the layout of elements and sections. You can choose the number of rows and columns you want, and set their size using responsive measurements (e.g. fr, Min/max, %).

[Video](https://youtu.be/6Xxe0Wl1Xj0)

> Go to our [Wix Studio Academy](https://www.wix.com/studio/academy) to check out additional Wix Studio webinars, tutorials, and courses.

---

## Switching from section grid to a CSS grid

Sections in the editor come a built-in section grid. It's an easy-to-use version of the advanced grid, based on the same CSS logic. Switching to an advanced CSS grid gives you more precise control of the layout per breakpoint.

> **Note:** Once you make the switch, it is not possible to go back to a section grid. However, if you just performed the action, you can use the **Undo** button ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/11/609653c3-e6c0-459a-9d9b-ba3243e57d41/76da46b3-bab2-4684-85d8-4589e5951995.png) at the top right of the editor.

### To switch from section grid to a CSS grid:

1. Select the relevant section.
2. Click the **Open Inspector** icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/06/14/2dd40586-1f79-4376-aee0-387212a246bb/dfed4075-2e24-4ad8-a7c4-8857038d5f16.png) at the top right of the editor.

![A screenshot of opening the Inspector panel in the Studio Editor.](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/d6b40156-9694-4cfe-9209-54815ef9d6dc/2024/03/07/ed25ff0f-6b3d-4d1c-9155-e9b1c788a0b5/326f9801-aa4e-4ca8-8989-360b80ec33f2.png)

1. Scroll down to **Layout**.
2. Click **Switch** next to **Advanced CSS grid**.
3. Click **Switch to CSS Grid**.

![A screenshot showing the option to switch to advanced grid in the Inspector panel](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/97842653-fb08-49e9-87ef-0414d245fbd7/64c99f7f-7e19-4339-a2ee-a73b1738c99d.png)

> **What's next?** Customize the rows, columns and spacing from the Inspector panel. You can also drag grid lines on the canvas to move them.

---

## Applying a CSS grid on other elements

You can apply a CSS grid to container, popup, flexbox and repeater items. Specifically in the repeater element, once you apply a grid to one item, the rest update automatically.

### To apply a CSS grid:

1. Select the relevant element in the editor.
2. Click the **More Actions** icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/9f2bd774-9889-4f24-ad05-ea21abce35a8/0352d524-5274-4870-84b2-15eee191e193.png).
3. Click **Apply Advanced CSS Grid**.
4. Choose a layout from the **1x1** drop-down.  
**Tip:** Select **Other** if you want to set your own number of rows and columns.

![A screenshot showing the drop-down that you can click to choose another layout](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/6e40d88f-c2f7-4f62-9685-6785c42f6959/501ad769-4b89-4aee-a1ae-18c231462675.png)

> **What's next?** Customize the rows, columns and spacing from the Inspector panel. You can also drag grid lines on the canvas to move them.

---

## Customizing a CSS grid

Customize your grid to get the exact layout you want. You can change the number of rows and columns, adjust their size and the gaps between them.

### To customize a CSS grid:

1. Select the relevant element or section.
2. Choose how you want to customize the grid:

**Choose a different layout**

The drop-down that lets you choose a new layout is available in 2 places: 

* On the element
* In the Inspector panel

  
 The list of available layouts is based on the current number of rows and columns, suggesting different ways to organize the cells. 

  
![A screenshot showing the drop-down that you can click to choose another layout](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/ebe1d6a5-9cdd-469b-beef-5a63c862e37d/655527c2-3ac9-4c18-99d8-93a8106d1ffa.png)

**Add more rows and columns**

Create the grid in a visual manner, looking at your existing layout while adding rows and columns. This doesn't change the elements' placement.

1. Click the **Customize grid on canvas** icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2022/08/02/6e538473-e0df-4292-a022-78fae82a4009/a101ee19-92cd-460e-8fd5-de9354576cdd.png).
2. Drag from the left or upper edges of the grid to add new lines.

  
![A GIF showing how dragging grid lines from the edges adds a new row or column](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/11/b7dd3485-9f5e-4d66-8c64-d22019a7af24/0bcc9aca-5d09-4455-9ee9-24e0a32c0dfe.gif) 

  
**Tip:** You can add more rows and columns from the Inspector panel as well. Hover over the relevant row / column and click the **More actions** icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/1aa9979a-9ee9-4c83-b1e6-5d83de468d7f/12398c1e-cddb-44c3-8114-3c3eb03018fb.png) to see this option. 

 This might move elements around to create enough space for the new row or column. 

![A screenshot showing how to add another row or column from the Inspector](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/13b1d534-1252-47a3-8d81-7a90b24f26b6/03fa85bd-d31f-4432-811e-0588d09708b7.png)

**Change the size of your columns or rows**

There are 2 ways to change the size of the rows or columns on your grid:

* **In the Inspector panel:** Enter the size and unit next to the relevant column / row number.  
![A screenshot of the layout section in the Inspector, resizing each column of the grid](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/1bd9ae5b-88c4-4b06-8f60-b229e7dca6a7/d21ccb21-3f5e-4288-9231-d72b8db82f39.png)
* **On the page:** Drag the handles on the horizontal and vertical gridlines to the position you want.  
**Tip:** You can click the Customize grid on canvas icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2022/08/02/6e538473-e0df-4292-a022-78fae82a4009/a101ee19-92cd-460e-8fd5-de9354576cdd.png) to drag the gridlines without affecting the elements' position.  
![A GIF showing that dragging the gridlines on the canvas resizes the rows and columns](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/17a190cc-8cfe-4e1c-9210-585a9c129f0b/a261279d-aee2-4da0-9158-4f583a6cca94.gif)

**Delete a column or row**

1. Click the **More actions** icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2022/03/09/421ae002-9a15-4224-aed2-1eab656c22bb/ee70d314-56ad-4938-868e-8e8428bfd4bd.png) next to an existing column or row.
2. Click **Delete column** / **Delete row**.  
    
![A screenshot of the Inspector panel, showing how to find and delete a grid column](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/7fe5a96e-e31b-4523-a34a-22d334da9cfa/8fc3073a-2690-4015-9cfb-34b5238febef.png)

**Edit the size of the gaps**

You can change the size of the gaps between the grid rows and columns by entering new values next to **Gaps**.

> **Note:** It is not possible to remove a CSS grid from a section. If you delete all of the rows / columns, the grid reverts to 1x1.

> **Working with breakpoints:** Your design cascades from desktop to the smaller breakpoints. We recommend tailoring the grid to each breakpoint to ensure the composition of your elements is flawless. In the example below, we set a different layout per breakpoint (3 columns on desktop vs. 3 rows on tablets). 
>
>   
> ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2024/06/25/5bdf769f-7199-4a8c-8f86-3bf1389df314/32fa39e5-88fa-43f1-ab5a-6c962cea23a0.gif)

---

## Positioning elements in a grid

While adding elements to the grid, several tools can help you set their placement more accurately.

## Docking elements

[Docking elements](https://support.wix.com/en/article/studio-editor-working-with-docking-margins-and-padding#adjusting-the-elements-docking-manually) to the gridlines ensures they're positioned exactly as you want. In the Studio Editor, all elements are automatically docked, but you can adjust the docking manually and add margins.

![GIF showing how to change the docking points of an element in a grid cell](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/f664e3c3-fe12-4d6a-85b1-0d2df2df7f9f/65bb6588-fde3-4641-b214-76bfc4af5ea2.gif)

## Moving elements between grid cells

Under the **Position** section in the Inspector, you can select an element and see the grid cell it's in. Click any grid cell to move the element there, without having to use drag-and-drop.

You can also enter the specific column and row numbers, which is useful when you need to place an element over multiple grid cells.

![A GIF showing how to click on other cells in the Inspector to quickly move elements between cells](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/c75a8852-bb9f-4a39-aa11-819dfec8eebb/37f1c153-8116-40c7-abd8-5c45dde1ff52.gif)

---

## Table of grid units

Use the whole range of CSS units to create your grid. You can set the size of the columns and rows using percentages, fractions or pixels. Alternatively, set the minimum and maximum size of the columns and rows, or use calculations to create the grid you require.

**Percentage (%)**

Set the size of the columns/rows to take up a certain percentage of the grid.

  
 For example, if you set a row to 25%, it takes up 25% of the grid height. If you set a column to 10%, it takes up 10% of the grid width.

**Fraction (fr)**

Set the size of your columns/rows to be a fraction of the size of the parent container.

  
 For example, in a grid of 2 columns where the left column is set to 2fr and the right one is set to 1fr, the left column will take up 2/3 of the parent container.

**Auto**

The height and width of the rows and columns are automatically set to fit the content inside them.

**Pixels (px)**

Set the size of your columns/rows to be a fixed number of screen pixels.

**Viewport width and height (vw and vh)**

Viewport is the visitor's browser window. You can set the size of columns or rows to be a percentage of the viewport width or height (accordingly).

**Min and Max content**

Set the size of your columns/rows to never get smaller than the minimum content.

**Min/max**

This option lets you enter the minimum and maximum size of the row/column.

**Calculation**

Write a formula to automatically calculate the size of a row/column.

> **Dealing with overlapping elements?** Review [our troubleshooting video](https://www.youtube.com/watch?v=bh1TeMhCm4M) to learn what to check and how to resolve this issue.
