Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less buggy solution to solving the floating footer problem #18

Merged
merged 2 commits into from
Jan 7, 2024

Conversation

ButteredCats
Copy link
Contributor

I found that my previous fix for this had a problem where the footer would end up on the wrong spot in very short posts that had no comments, sorry about that!

This is a much simpler fix to the problem that also avoids running into that issue.

After another look I realized that the problem revolves around what classes the body has. Only the fixed_navbar class had position: relative; and therefore when the body lost that from turning "Keep navbar fixed" off, the footer was no longer relative to the body. Hence why it would show up at the bottom of the initial viewport and be fixed there.

This fix just restores the old CSS file and gives the card class the same properties as the fixed_navbar class besides it's top padding in order to make sure both are in line with each other and combat that problem.

@ButteredCats
Copy link
Contributor Author

Slight update.

Realized that I could have been better about assigning options to the classes and in testing found that the footer would end up 30px above or below the initial viewport on short posts. 30px below was already present (even before #17) but 30px above was the product of my first commit in this pull request. I think I forgot to test the short post with fixed navbar off and so I missed that.

Both of those issues are now solved and everything has been retested on both desktop and mobile with both navbar options. The footer now behaves as it should in every circumstance.

@sigaloid
Copy link
Member

sigaloid commented Jan 7, 2024

Looks great, tested and works. Thanks for the improvement!

@sigaloid sigaloid merged commit f50872a into redlib-org:main Jan 7, 2024
3 checks passed
@ButteredCats ButteredCats deleted the fix_footer branch April 7, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants