Persistant Footer The Wappler Way?

I want to create a persistant footer at the bottom of the viewport, which stays there as the user scrolls… is there a Wappler/Bootstrap way to do this now, or do I just add my own CSS as per this post below?

Or can I use an off canvas which is always on the page? :thinking:

I believe adding a Footer element with fixed bottom position to the layout (node) is what you are looking for.

2 Likes

You need to add class="fixed-bottom" to the element you want to stay fixed at the bottom.

1 Like

And make sure you add some bottom margin to the main area otherwise it will go behind the fixed footer.

1 Like

I think you’re question has been answered, but it might be worth mentioning that Ben’s solution does not give the same result as the other solution. For most purposes, I think Ben’s solution is preferable - but the solution suggested by Teodor perhaps answers your question more precisely (and is hopefully what you want).

1 Like

Thanks for your reply @TomD… can you put the difference in a few words so I understand the subtitles of this?

Certainly - or perhaps a few images might be clearer.

If there isn’t enough content to fill the page - eg on a login page - the default position of the footer looks silly (IMO). It will appear where the content ends:

image
(this is very common on lots of websites)

Using Bootstrap’s ‘fixed-bottom’ class, it looks fine (in this case, at least):

image

But if there is sufficient content that requires scrolling, the footer will still be at the bottom of the page:

image

… which is the most accurate answer to your question, and may well be what you want, but it’s not the best solution for typical websites (IMO). Generally, it’s best if the footer appears at the bottom: either if there’s isn’t enough content to fill the page or once you scroll to the bottom of the page. This is what Ben’s solution offers.