Place WordPress Footer At End Of Page

I have a dilemma that appreciates and tries any suggestion put forward. I have a localhost running wordpress using the theme The Fox. I have everything running perfectly except for the footer.

I have some pages that the content does not extend a page, while others extend more than a page and the issue I have is that the footer starts exactly where the text ends and I dont want to add white space because of view port dissimilarities. As you can see below, I have a screenshot of a sample page with small content.

Read More

Screenshot of Sample Page

I hope you noticed the extra white space after the footer, which is also on the screen taking the footer to the center of the page.

I want the footer to extend to the end of the page no matter the length of the content or the size of the screen.

Inside the CSS, there is a footer section and it is here on Pastebin but I think the most important one is as below;

footer

{
bottom:0px;
right:0;
left:0;
overflow:auto;
padding:0px;
min-height:70px!important;
height:auto;
position: relative;
z-index: 9000;}

In the footer, I am using just a single column and I think this code handles that… also in pastebin.

 .footer_1_col .widget_wrap 
   {
width:100%!important;
float:none!important;
margin-left:auto!important;
margin-right:auto!important;
padding-right:10px!important;
}

And on the footer type, I use type 8, which uses the code;

/**************************************************
   Footer Type 8

**************************************************/
   .footer_type_8 .widget_wrap {
    margin: 10px 0px 0px 0;
    }
    .footer_type_8 .widget {
    margin:0px 0px 0px 0;


}
.footer_type_8 .widget h2 {
font-size:10px;
text-transform:uppercase;
font-weight:900;
letter-spacing:normal;
line-height:14px;
margin-bottom:0px;
padding-left:0px;
position: fixed;
}
.footer_type_8 .widget_line {
display:none;
}

Please what am I doing wrong and where do I need to make changes? If you need to see some other code, please let me know and I will post it on pastebin.

Thanks.

Related posts

1 comment

  1. Special thanks to @Firasd for his comments that made this possible.

    All I did was to look for the body element using the browser inspector, and then recalculate the size for that element using the already known static height of the header and footer.

    This Was Added to the Page’s CSS Section

    html,body {height:100%;}#fw_c { min-height: calc(100vh - 162px);}
    

    The theme uses Bakerly Visual Composer and I just had to add the above code to the page I want the changes.

    Note that if you have a slider, you will need to put that in your calculation too except if your slider is in a row element.

Comments are closed.