Skip to content

Commit 1b02ad1

Browse files
committed
Fix sticky footer
1 parent 89cb352 commit 1b02ad1

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

_includes/footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<footer class="footer" aria-label="Footer">
22
&copy; namecard
3-
</footer>
3+
</footer>

assets/style.scss

+8-7
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,16 @@ th {
102102
}
103103

104104
/***** PAGE STYLING *****/
105-
html,
106-
body {
107-
min-height: 100%;
105+
html {
106+
height: 100%;
108107
scroll-behavior: smooth;
109108
}
110109

111110
body {
112111
display: flex;
113112
flex-direction: column;
114113
max-width: 100rem;
114+
min-height: 100%;
115115
margin: auto;
116116
padding: 7rem 10rem; // top-bottom left-right
117117

@@ -121,7 +121,7 @@ body {
121121
font-size: $font-size-base;
122122
}
123123

124-
.nav-bar {
124+
nav {
125125
text-align: right;
126126

127127
.nav-item {
@@ -137,7 +137,7 @@ body {
137137
}
138138

139139
main {
140-
flex-grow: 1 0 auto;
140+
flex-grow: 1;
141141

142142
.intro {
143143
padding: 10em 1rem;
@@ -157,8 +157,9 @@ main {
157157
}
158158
}
159159

160-
.footer {
161-
flex-shrink: none;
160+
footer {
161+
align-self: end;
162+
width: 100%;
162163
text-align: right;
163164
}
164165

0 commit comments

Comments
 (0)