File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ html ,
2+ body {
3+ height : 100% ;
4+ }
5+ body {
6+ display : flex;
7+ flex-direction : column;
8+ }
9+
10+ .article .content {
11+ /* Override 100vh from myst-theme:styles/typography.css so content div
12+ * doesn't push the footer offscreen.
13+ */
14+ min-height : 0vh ;
15+ flex-grow : 1 ;
16+ flex-shrink : 0 ;
17+ flex-basis : auto;
18+ }
19+
120.footer {
21+ /* Make footer "sticky" to page bottom (also the above flex rules), per
22+ * the flexbox strategy described here:
23+ * https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox
24+ * and here:
25+ * https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
26+ * This solution does not require hardcoding a fixed footer height in the
27+ * style rules.
28+ */
29+ flex-shrink : 0 ;
230 background : # 013243 ;
331 color : white;
432 padding-left : 2rem ;
Original file line number Diff line number Diff line change @@ -3,8 +3,11 @@ version: 1
33project :
44 id : ee007168-b9a5-4dba-8823-1639a4aeb956
55 title : Hello Landing Pages
6+ abbreviations :
7+ CSS : Cascading Style Sheet
68 toc :
79 - file : index.md
10+ - file : other-page.md
811site :
912 template : book-theme
1013 title : Hello Landing Pages
Original file line number Diff line number Diff line change 1+ # Other Page
2+
3+ This page contains some content. It demonstrates the use of custom CSS to implement a sticky footer.
You can’t perform that action at this time.
0 commit comments