-
-
Notifications
You must be signed in to change notification settings - Fork 700
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
Modify base.html template to support optional sticky footer #1446
Labels
Comments
simonw
changed the title
Modify base.html template to support optional stick footer
Modify base.html template to support optional sticky footer
Aug 24, 2021
simonw
added a commit
that referenced
this issue
Aug 24, 2021
OK, now the following optional CSS gives us a sticky footer: html, body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
.not-footer {
flex: 1 0 auto;
}
footer {
flex-shrink: 0;
} |
Pasting that CSS into the styles editor in the developer tools on https://latest.datasette.io/ has the desired effect: footer at the bottom of the window unless the page is too long, in which case the footer is at the bottom of the scroll. |
I used the sticky footer mechanism in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The neatest way to have the footer stick to the bottom of the browser window that I've found is to use the flexbox pattern from https://css-tricks.com/couple-takes-sticky-footer/
I tried this in a custom plugin but it ended up having to duplicate the entire
base.html
template just to get a wrapper around the not-footer content.I think Datasette's own
base.html
template should have this wrapper element instead.The text was updated successfully, but these errors were encountered: