Problem/Motivation
When there are not enough content, the footer will rise to the top.
Steps to reproduce
Open any page, and make it with a little content [one paragraph as an example], and then look to the footer, it will rise to the top.
Proposed resolution
Have the following changes on both vartheme_bs4 and VARTHMEM_BS4_SUBTHEME template.
- Change
min-height: 100vhfor the page - Change to stick the footer to the bottom
- Add
mb-5on last div before thefooter-wrapperin the page to add spacing before footer
{# Main #}
{% block main %}
<div role="main" class="main-container {{ container }} js-quickedit-main-content mb-5">
.....
.....
.....
</div>
{% endblock %}
{% if page.footer %}
{% block footer %}
<div class="footer-wrapper">
<footer class="footer {{ container }}" role="contentinfo">
{{ page.footer }}
</footer>
</div>
{% endblock %}
{% endif %}
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ✅ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ✅ Release varbase-9.0.7, vartheme_bs4-9.0.15
Varbase update type
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
Before:

After [With less content]:
![After [With less content]](/files/issues/2022-05-18/moderate-9.png)
After [with large content]:

API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Issue #3280063 by Abdullah Yassin, Alaa Jwiehan: Fixed footer position bottom when page have a little content in Vartheme BS4
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 9-before.png | 58.05 KB | alaa jwiehan |
| #19 | full-9.png | 341.89 KB | alaa jwiehan |
| #18 | moderate-9.png | 127.39 KB | alaa jwiehan |
| #17 | empty-9.png | 58.05 KB | alaa jwiehan |
| #12 | Screenshot from 2022-05-16 11-17-31.png | 276.98 KB | Abdullah Yassin |
Issue fork vartheme_bs4-3280063
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Abdullah Yassin commentedComment #4
Abdullah Yassin commentedComment #5
Abdullah Yassin commentedComment #6
Abdullah Yassin commentedComment #7
rajab natshahComment #9
rajab natshah❌ Testing to ensure no regression
Regression issue

I have noticed the following
Needs to have a bit of spacing between the footer and the last section or element in the page.
Comment #10
rajab natshahComment #12
Abdullah Yassin commentedFix footer spacing:

Comment #13
Abdullah Yassin commentedComment #14
Abdullah Yassin commentedComment #15
Abdullah Yassin commentedComment #17
alaa jwiehan commentedComment #18
alaa jwiehan commentedComment #19
alaa jwiehan commentedComment #20
alaa jwiehan commentedComment #21
alaa jwiehan commentedComment #22
rajab natshahComment #23
rajab natshahComment #24
rajab natshahComment #25
rajab natshahComment #26
rajab natshahComment #28
rajab natshahComment #29
rajab natshah✅ Released varbase-9.0.7