- This topic has 9 replies, 4 voices, and was last updated 2 years, 8 months ago by Tom.
November 12, 2014 at 2:50 am #45731Laura
I have a page design with only one content container (i.e. no sidebars and content layout is set to one container). I would like to make the main container extend to the bottom of the browser window (footer showing as well) regardless of how much content there is on a page. So that there would not be any background showing after footer.
I’ve tried some css but no success. Is this doable?
Thanks much 🙂November 12, 2014 at 12:04 pm #45862TomLead DeveloperLead Developer
The answer here is pretty good: http://stackoverflow.com/questions/9214040/how-to-properly-set-the-100-div-height-to-match-document-window-height
You can add that CSS in GP Hooks in the wp_footer area between
Let me know if that works for you or not 🙂November 12, 2014 at 1:17 pm #45880Laura
Thanks again Tom :).
I may just leave it as it is, but good to know I have a back up plan if the client really doesn’t like the page the way it is.
Great template, addons and awesome support Tom. Really happy I stumbled across GeneratePress!November 12, 2014 at 1:51 pm #45885TomLead DeveloperLead DeveloperJanuary 8, 2018 at 3:21 am #465652Michaella Seidel
in the meantime, is there a better way to achieve this?
How would I add the wrappers of the proposed method to each page?
DavidJanuary 8, 2018 at 9:19 am #465965LeoStaffCustomer Support
I believe you are referring to the same issue here: https://generatepress.com/forums/topic/disable-background-passed-the-footer/#post-277019January 9, 2018 at 12:13 am #466384Michaella Seidel
unfortunately not. I think the problem is similar but not the same.
In my case the page is not tall enough as well and that leads to undesirable white space below the footer bar.January 9, 2018 at 6:43 am #466595LeoStaffCustomer SupportJanuary 10, 2018 at 1:47 am #467341Michaella Seidel
Yes. Unfortunately not working… 🙁January 10, 2018 at 9:45 am #467748TomLead DeveloperLead Developer
That CSS is supposed to add the same color as your footer bar below the footer, so there’s not a sudden color change.
Actually sticking the footer to the bottom of your browser requires javacript, which will hurt the performance of your page. Might be better to use the above method, or even set a min-height to your content?
- You must be logged in to reply to this topic.