Archived topic
Background not contained in section
5 replies · Started by Thierry on October 30, 2018
Hello,
How i can displaying background image contained in section. It's possible ?
Thx
my config : https://ibb.co/cHSE2f
You would have to set the outer container to contained, as the background is applied to it.
Does that not work for your current layout?
of course but how i can displaying a background color in the full width ?
Ah, in that case you'd need to keep it to full width. Then you'd have to add the background image with CSS.
For example, give the Section a class: my-contained-background
Then add the CSS:
.my-contained-background > div {
background-image: url( 'URL TO YOUR IMAGE' );
background-size: cover;
}
thanks Tom but if i want one image cover (contained) and one background color (full width) for each page is not possible ? (with section)
Hi there,
to do that would require a container being added to the content, which the background image and vertical padding is added e.g:
HTML:
<div class="my-contained-background">
My content goes in here
</div>
CSS:
.my-contained-background {
padding-top: 100px;
padding-bottom: 100px;
background-image: url( 'URL TO YOUR IMAGE' );
background-size: cover;
}