Please provide a link to a page on your site where we can see this. Thanks. Note: Your link will be public and we will not later remove it.
The background image fully fills the block. Is it the mustard-color block you want to completely cover it?
Thread Starter
rod
(@nomadarod)
I want it to cover it completely on the sides, like a banner. I am guessing the cover block has padding. And I am a bit lost on the best way to edit it and recreate it in several pages, if I should create a child theme or what?
This is the best I’m able to do
.wp-block-cover .wp-block-cover__inner-container, .wp-block-cover-image .wp-block-cover__inner-container {
width: 100%;
height: 100%;
}
Thread Starter
rod
(@nomadarod)
Thanks Steven. I’ll try it.
Can you help me know where do I add it? I need to create a child theme?
Maybe the solution is to use a different block.
Thread Starter
rod
(@nomadarod)
I think I found the element and the width variable responsible for it.
I added in the aditional css costumizing:
.wp-block-cover .wp-block-cover__inner-container {
width: 100%;
}
.wp-block-cover {
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}
But this will apply the changes on all elements which have those classes, allover the website, right? How can I apply it only in certain occasions? I tried to select the element “cover” in the page and add a class to that block called “page-banner”, and then return to the css customiser and add that new class behind the other classes, like this:
.page-banner .wp-block-cover .wp-block-cover__inner-container {
width: 100%;
}
.page-banner .wp-block-cover {
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}
but it didn’t work. What am I doing wrong?
-
This reply was modified 5 years, 3 months ago by
rod.
Thread Starter
rod
(@nomadarod)
It’s good. I had a css mistake, the space between .page-banner and .wp-block-cover.
.page-banner.wp-block-cover .wp-block-cover__inner-container {
width: 100%;
}
.page-banner.wp-block-cover {
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}
now it worked π