# Resize an element
Make elements the right size on every screen, like a button that fills the width on mobile, a text block that doesn't get too wide to read, or an image that keeps its size no matter what.
**Best fits for:**
* Setting an exact size for an element you just added
* Making sure an element never grows or shrinks past a certain size, regardless of screen width
* Deciding whether an element should scale in proportion to its container, or stay a fixed size
## Resize an element
1. Select the element.
2. Drag the handles on the canvas, or go to **Design** > **Size** in the Inspector and enter a **Width** and **Height**.
Size can be set separately for each device. Switch to **desktop**, **tablet**, or **mobile** in the top bar before adjusting.
### Choose a sizing mode
Width and height each have a dropdown with 5 modes:
| Unit | What it does |
| --------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Fixed** | Exact pixel value — stays the same regardless of screen width or its parent's size. |
| **Relative** | A percentage of the parent's size — scales in proportion as its container resizes. |
| **Fit content** | Sizes automatically to match its content — grows or shrinks as content is added or removed, with no number to set. |
| **Fill** | Expands to fill whatever space is left in its container. |
| **Custom** | A free-form field — type any value and unit. [Learn more](https://docs.foxecom.com/foxify-app/foxstudio/layout-and-styling/resize-an-element#about-custom) |
An element set to **Fixed** 600 px is wider than most phone screens. Switch to mobile view and change it to **Relative** or **Fill**, or add a **Max width** of 100%.
*Example*: a text element inside a stack is set to **Relative 50%**. It always takes half the stack's width, however wide or narrow the stack gets.

If the same text is set to **Fill** instead, it takes all the width its neighbors don't use.
#### 
### About Custom
Type a value in the field, and the dropdown updates to match:
* Type **100%**, and it switches to **Relative**.
* Type **250px**, and it switches to **Fixed**.
* Type another unit, like **1.5rem**, and it stays **Custom**.
Use **Custom** when you need a unit that scales with your text size, like **rem** or **em**. For example, **2rem** is twice your store's base font size.
## Set a minimum or maximum size
1. In **Design** > **Size**, select **Add min/max**.
2. Choose **Min width**, **Min height**, **Max width**, or **Max height**. Add only the ones you need.
3. Enter a value.

* `Max width` / `Max height` — the element never grows past this size, even if there's room available.
* `Min width` / `Min height` — the element never shrinks below this size, even if the screen is too narrow to fit it.

## FAQs
#### My element is cut off or overflows on mobile. How do I fix it?
It probably has a **Fixed** width that's wider than the screen. Switch to mobile view and change its width to **Relative** or **Fill**.
#### What's the difference between Fixed, Relative, and Fit content?
**Fixed** stays the same size no matter what. **Relative** scales with its container. **Fit content** matches whatever's inside it.
#### When should I use Fill instead of Relative?
Use **Fill** when an element should take whatever space is left, and you don't know how much space its neighbors need. Use **Relative** when it should always take a set share, like exactly half.
#### What happens if I set Relative width and a Max width?
The element scales with its container, but stops growing at the **Max width** value.
#### Does changing the size on mobile change it on desktop too?
No. Size is set separately for each device.
## Related articles
Edit elements with the Inspector panel
Control element position with constraints
Build layouts with cells and grids