Skip to content

Commit 8016fca

Browse files
committed
Replace fixed footer with flexbox sticky footer (margin-top: auto)
1 parent 30e35da commit 8016fca

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

Wireframe/style.css

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,7 @@ main {
5353
max-width: var(--container);
5454
margin: 0 auto calc(var(--space) * 4) auto;
5555
}
56-
footer {
57-
position: fixed;
58-
bottom: 0;
59-
text-align: center;
60-
}
56+
6157
/* ====== Articles Grid Layout ====
6258
Setting the rules for how articles are placed in the main element.
6359
Inspect this in Devtools and click the "grid" button in the Elements view
@@ -104,9 +100,7 @@ header {
104100
}
105101

106102
footer {
107-
position: fixed;
108-
bottom: 0;
109-
left: 0;
110-
width: 100%;
103+
margin-top: auto;
111104
text-align: center;
105+
padding: var(--space);
112106
}

0 commit comments

Comments
 (0)