- This topic has 25 replies, 4 voices, and was last updated 3 years, 8 months ago by
David.
-
AuthorPosts
-
July 7, 2022 at 1:00 am #2275736
Rostyslav
What I am tryng to achive is this: https://ibb.co/3sgQxK3 Backgound full width block image for that wrapper.
July 7, 2022 at 1:09 am #2275745Rostyslav
Something is not working because on mobile is working bad and the wrapeer’s containers are messing.
July 7, 2022 at 1:10 am #2275746Fernando Customer Support
You have this CSS which is affecting your new Container image as well:
.has-background-image .gb-inside-container figure { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }Replace it with something like this so it doesn’t affect other images:
.has-background-image > .gb-inside-container > figure { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }Kindly let us know how it goes.
July 7, 2022 at 1:40 am #2275773Rostyslav
Thanks guys! Its working perfect! I am not closing the topic in case of future questions about it.
July 7, 2022 at 1:57 am #2275784Fernando Customer Support
You’re welcome Rostyslav!
July 7, 2022 at 8:08 am #2276250Rostyslav
Hello again! Its not working properly: http://s897840961.mialojamiento.es/hola/
https://ibb.co/Fmwr7PZ
https://ibb.co/x37L5K8Is there any way to make it work like this code:https://generatepress.com/forums/topic/use-new-image-block-as-background-image/#post-2274695
I whould like to fit all the content inside the image block container.
July 7, 2022 at 8:25 am #2276268David
StaffCustomer SupportThe method i provided here:
https://generatepress.com/forums/topic/use-new-image-block-as-background-image/#post-2274695
Should work with ANY Container block, including those that are automatically added inside the Grid block.
Create a new Grid block, select 1 x column.
Now select the Container Block that was automatically created and give it thehas-background-imageclass.
Then follow the rest of those steps.July 7, 2022 at 9:09 am #2276327Rostyslav
David, you are GENIUS! Seriously! Thank you for putting up with.
July 7, 2022 at 9:39 am #2276355David
StaffCustomer SupportGlad to be of help 🙂
July 18, 2022 at 3:16 am #2285914Rostyslav
Hello again!
I inside a container I have more that one image. To make the first one as background without affectig the other ones. Is this code okay?
.has-background-image { position: relative; } .has-background-image .gb-inside-container > * { position: relative; z-index: 1; } .has-background-image > .gb-inside-container > figure:first-child{ position: absolute; top: 0; right: 0; bottom: 0; left: 0; } .has-background-image .background-image { width: 100%; height: 100%; object-fit: cover; z-index: -1; }Thanks
July 18, 2022 at 6:29 am #2286096David
StaffCustomer SupportYeah that would work 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.