Footer background = page background ?
-
Hey there,
i am really struggeling on this one. I want the same footer on every page with the background of that page.
Some pages are just colored and some have background images. The problem is that the footer always uses the global background color.-
i already set the footer-backgroundcolor to transparent
-
i used a transparent .png as global background image
is there a way to make footer-background transparent?
I am not looking for this code :
#footer-region{ background-color: transparent; }
or this
.slug-page #footer { background-color: transparent; }
Thanks for any help
-
-
i think the body color is not set, only the color of the current grid that you see.
the footer is a different grid
so the footer will always have the background that you set in the footerput this in lay options → custom <head> content:
<script> window.laytheme.on("newpageshown", function(){ var color = jQuery("#grid").css('background-color'); jQuery("#footer").css('background-color', color); }) </script>
-
this will always take the bg color of the current page and set the footer to it
-
I've looked around for the similar issue too. Thanks for the code, it works for me!
-
Hello, I also have a follow-up question. The code works in the desktop version, but it seems not working for the mobile. Is there any solution for this? Thank you very much!
-
@auditoryscenes maybe you need to change #grid to #custom-phone-grid and/or #footer to #footer-custom-phone-grid, depending on your layout.
-
@felix_rabe thanks! It works!
Just in case someone also needs this:
<script>
window.laytheme.on("newpageshown", function(){
var color = jQuery("#custom-phone-grid").css('background-color');
jQuery("#footer-custom-phone-grid").css('background-color', color);
})
</script>
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it