Skip to content

Commit f24bda9

Browse files
committed
Solve issue of footer not stretching correctly
1 parent e9d0f22 commit f24bda9

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/components/Footer.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ footer {
99
padding: 0.5em;
1010
margin: 0em;
1111
box-shadow: 0em 1em 2em black;
12+
flex-shrink: 0;
1213
}
1314

1415
footer p {

src/components/Layout.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ const profile = ogType === "profile" ? [
7474
<body>
7575
<Header />
7676
<Navigation />
77-
<div class="content">
77+
<main class="content">
7878
<slot />
7979
<!-- This is where the page-specific content will go -->
80-
</div>
81-
<Footer class="footer" />
80+
</main>
81+
<Footer />
8282
</body>
8383
</html>

src/components/Layout.css

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,14 @@ html, body {
1212
body {
1313
display: flex;
1414
flex-direction: column;
15-
min-height: 100%;
15+
min-height: 100vh;
1616
box-sizing: border-box;
1717
overflow-y: auto;
1818
overflow-x: scroll;
1919
}
2020

21-
.content {
22-
flex: 1 0 auto;
21+
main {
22+
flex: 1;
2323
padding: 1em;
2424
box-sizing: border-box;
25-
}
26-
27-
footer {
28-
flex-shrink: 0;
29-
box-sizing: border-box;
3025
}

0 commit comments

Comments
 (0)