How does Quarto position the footer? #6305
-
DescriptionHi. I was wondering how Quarto ensures that the footer is always at the bottom of the webpage. I couldn't find any CSS rules in the generated Here is a concrete minimal example:
project:
type: website
website:
title: "Quarto lab"
navbar:
left:
- href: index.qmd
text: Home
page-footer: Footnote content
format:
html:
theme: cosmo
css: styles.css
toc: true
---
title: "Quarto lab"
---
Main content. The relevant portion of the generated <footer class="footer">
<div class="nav-footer">
<div class="nav-footer-left">
</div>
<div class="nav-footer-center">Footnote content</div>
<div class="nav-footer-right">
</div>
</div>
</footer> However, I couldn't find anywhere in What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If you're talking about how we 'force' the footer to be at the bottom of the page even when the content is smaller than the viewport, we're actually doing that by increasing the content area using the <div id="quarto-content"
class="quarto-container page-columns page-rows-contents page-layout-article page-navbar"
style="min-height: calc(-120px + 100vh);"> We compute that styling using javascript (to determine the height of the footer), so you won't see it in the HTML source, but will see it in the computed HTML in the inspector. HTH! |
Beta Was this translation helpful? Give feedback.
If you're talking about how we 'force' the footer to be at the bottom of the page even when the content is smaller than the viewport, we're actually doing that by increasing the content area using the
min-height
style:We compute that styling using javascript (to determine the height of the footer), so you won't see it in the HTML source, but will see it in the computed HTML in the inspector.
HTH!