I have basic coding experience. In my WordPress install, some of my pages have a blank white space under the footer that I would like to remove. I have tried several solutions but to no avail. The problem is persistent on chrome, Firefox, IE etc.
I’m not really sure of the cause, but the size of the white space changes depending on computer/browser/resolution.
As I am working in WordPress I have access to custom CSS and source theme files, however, I would prefer to solve this problem with custom CSS.
I would like a footer that sticks to the bottom of the browser window with no whitespace below it.
Q. Please provide me with code/solution that will remove the white spaces below the footer on my website (preferably custom CSS method).
You can find an example of the white space on my website here. (try viewing on a browser resolution higher than 1280×800)
Solutions i’ve tried:
-
#footer {overflow: hidden;}
didn’t work -
Putting
html, body, parentDiv, childDiv, section, footer { height : 100%; }
in my css but that didn’t work -
#copyright { padding-bottom: 20px;}
“#copyright” is under the footer so this did reduce the whitespace to a point where it seemed it weren’t present, but on taller browser windows the white space reappeared.
You have whitespace under the footer because the content is not sufficient to push it past the bottom of the monitor at higher resolutions.
I’d recommend using the Sticky Footer to handle this. It allows the minimum height of the body to be that of the browser, regardless of how little content is in the page.
The sticky footer solution requires some specific HTML to be included, and some basic CSS. Here’s a Fiddle of Ryan Fiat‘s sticky footer in action using the code from his example.
The code goes like this:
HTML:
CSS:
Looking at your markup, you can use your existing
div class="clear"></div>
as your.push
div, then you only need to add thediv class="wrapper">
around your content.Try something like this
DEMO: https://help.podio.com/hc/en-us
replace this code with this one,
this helped mine. hope for you too guys..