Site logo

Archived topic

section

7 replies · Started by ivar on March 3, 2019

Viewing posts 1–8 of 8

how to make the CSS minimum height for each section and make the background image in the center?

Hi there,

are you using the GP Sections? if so:

to make all sections a minimum height and have the background centered then this CSS:

.generate-sections-container {
    min-height: 400px;
    background-position: center center;
}

If you want to selectively apply this CSS then use this instead:

.section-min-height {
    min-height: 400px;
}
.section-bg-centered {
    background-position: center center;
}

Then in the Section > Settings --> Custom Classes field you can add those classes e.g

section-min-height section-bg-centered

Any chance you can link me to the Site? You can edit your original topic and use the Site URL field for privacy.

site:
https://neformativ.ru/

now use:

.generate-sections-container {
background-position: 50% center;
}

You could try giving that section a height that is based on viewport width.
e.g give the section a class - section-vw-height

Then something like this:

.section-vw-height {
    height: 40vw;
    min-height: 400px;
}

This will scale the height based on how wide the screen is but never less than 400px.

I will not cease to be surprised by your support!... Everything works. Thank you!

You're welcome - glad to be of help

This archived topic is closed to new replies.