Block Background Image not displaying on custom theme
Permalink 1 user found helpful
I am trying to add several blocks to a page that have a background image. Since I want my client to have access to easily change the background image, I would like to do this using C5's editing tools. However, it does not appear to be working properly.
I click on the block, and select "Design & Custom Template". From there, I click on the little image icon in the toolbar and select an image. I click "Save", and the background image appears properly. Once I publish the page, however, the background image disappears.
I can see these classes wrapping the block before and after I publish: ccm-custom-style-container ccm-custom-style-main-28
Prior to publishing, I can see this CSS is being applied.
.ccm-custom-style-container.ccm-custom-style-main-28 {
background-image: url(/application/files/6614/6584/8477/HERO-SectionHeaderImg-Sponsor.jpg);
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
}
Once I publish, however, I can see no reference to these styles.
The interesting thing is, it works on the default C5 theme.
Any idea on how to fix this?
I click on the block, and select "Design & Custom Template". From there, I click on the little image icon in the toolbar and select an image. I click "Save", and the background image appears properly. Once I publish the page, however, the background image disappears.
I can see these classes wrapping the block before and after I publish: ccm-custom-style-container ccm-custom-style-main-28
Prior to publishing, I can see this CSS is being applied.
.ccm-custom-style-container.ccm-custom-style-main-28 {
background-image: url(/application/files/6614/6584/8477/HERO-SectionHeaderImg-Sponsor.jpg);
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
}
Once I publish, however, I can see no reference to these styles.
The interesting thing is, it works on the default C5 theme.
Any idea on how to fix this?
As it may be relevant, here is my theme's page_theme.php file
Viewing 15 lines of 78 lines. View entire code block.
Figured it out. I did not have a div with the page wrapper class function wrapping the page.
<div class="<?php echo $c->getPageWrapperClass()?>"> <!-- page content --> </div>