Site logo

Archived topic

Set one block to full width

3 replies · Started by Kar Yung on November 19, 2020

Viewing posts 1–4 of 4

Hi,

You can create a CSS class that applies "full page width" size to elements by adding this CSS:

.full-page-width {
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
    max-width: 100vw;
    width: auto;
}
.full-page-width * {
    width: 100%;
}

You then add "full-page-width" to your content block's CSS class selectors on their Advanced settings.

Thanks Elvin. But what if I don't want it to take the entirety of the page? As in I just want the image to be a BIT wider than the width of the text block, which CSS property should I tweak?

Cause as far as I know what you gave me would stretch the image across the entire width?

This archived topic is closed to new replies.