Force footer to bottom of screen

Force footer to bottom of screen was created by trogladyte

Posted 6 years 10 months ago #42668
I have a site (actually numerous) where I want the footer to be at the bottom of the screen. www.ckdev.info/sedona is the current one.

The footer wrapper has a 50% #000000 color applied to it. I made 2 copyright module positions - one for desktop, one for mobile devices and assigned them in responsive. I searched the net (try not to bug you with every query!!) and found some code so added this to the module in the wrapper:

position: absolute;
bottom: 0;
left: 0;
right: 0;

Pushed it to the bottom, but deleted the color in the footer on desktop. I did not add to mobile as it will always bee at the bottom. Displays fine on mobile. So I added the code to the wrapper instead of the module position. This time the desktop was fine, but the mobile, not surprisingly, shows the footer at the bottom of the screen and stays in that position on the page.

It's kind of like the opposite of the sticky header but not quite. What am I doing wrong Ced?

Thanks.

EDIT: Actually, just found that this doesn't work, period. It fails on desktop if the page is longer than the screen too - just like on mobile. This may be a great widget to add. I would use it all the time.

A good landing is one you can walk away from.
A great landing is one where you can reuse the aircraft!

Last Edit:6 years 10 months ago by trogladyte
Last edit: 6 years 10 months ago by trogladyte.

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Force footer to bottom of screen

Posted 6 years 10 months ago #42682
Hi
remove your position absolute, this is not the solution
Try something like this in the paremeters >> custom css
Code:
#wrapper { min-height: calc(100vh - 100px); }

CEd

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Force footer to bottom of screen

Posted 6 years 10 months ago #42683
PS : you can adapt the 100px value to get the best result

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by trogladyte on topic Force footer to bottom of screen

Posted 6 years 10 months ago #42721
Thanks Ced. Changed the 100px to 10px and it looks great.

Thanks again!!

A good landing is one you can walk away from.
A great landing is one where you can reuse the aircraft!

Please Log in or Create an account to join the conversation.

Time to create page: 0.631 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 459 guests and no members online