Skip to content

Websites · 2 min read

Set Height and Width on a Page

Container Size sets how much space an element takes inside its parent column, row, or section. Margin and padding still work alongside height and width. Desktop and mobile values are independent.

Before you start

  • Units include px for a fixed size, % of the parent, em and rem relative to font size, vh and vw for the viewport, and auto for the element's natural size.
  • A value of 0 or below is ignored. The element stays at its current size.
  • Set the unit back to auto to return to the natural size.
  • Image elements can also take Height and Width in the image settings, using px, rem, em, or %. Enter those numbers in the device view they belong to. If you never set a mobile size, the image keeps the desktop size.

Set container size

  1. Open the page from Sites > Funnels or Sites > Websites.
  2. Select the element.
  3. Open the Styles tab.
  4. Scroll to Container Size.
  5. Next to Height, choose a unit and type the size.
  6. Next to Width, choose a unit and type the size.
  7. Use the device toggle beside Container Size and switch to Mobile View.
  8. Enter the mobile height and width if they should differ.
  9. Save and preview both desktop and mobile.
For an image, you can set Height and Width on the image itself:
  1. Click the image.
  2. Switch the builder between Mobile View and Desktop View.
  3. Enter Height and Width for that view, and pick px, rem, em, or %.
  4. Switch to the other view and enter its size.
  5. Save and preview both.

You should see

The element uses the desktop size on a wide screen and the mobile size on a phone. Percentage widths that fit on desktop can still wrap on a small screen. Check the phone preview after you use a percent.

Did this answer your question?

No, I need help

More in Websites