FoxstudioLayout & styling
Resize an element
2 min read
Resize an element
- Dragging the size handles on the canvas.
- Entering the width/height value in the Inspector panel.
- The
max-widthandmax-heightproperties will ensure that an element is never wider or taller than the value you set, even if there's enough room on the page for it to take up more space. - The
min-widthandmin-heightproperties will ensure that an element is never narrower or shorter than the value you set, even if the browser window is too small to display the whole element.

Size measurements
- Pixels (px) in Fixed sizing: If you want your element to stay the same when resizing.
- Percentage (%) in Relative sizing: The width/height value of the element depends on its parent's dimensions. This ensures the element resizes in proportion to its parent.
For example, you can add a text element to a stack and set its width to 50%. Your text then always takes up 50% of the stack container's width.

Resize Image elements
- Keep image ratio: The image height is scaled proportionally when resizing the image width to keep its ratio.
- Fill bounding box: The image is resized to fill the given dimension. If necessary, the image will be stretched or squished to fit.
- Fit to bounding box: The image keeps its aspect ratio, but is resized to fit within the given dimension.

Last updated