Skip to content

Commit 68bbc57

Browse files
committed
footer correctly fixed and content is scrollable.
1 parent 6a2cc8f commit 68bbc57

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

Wireframe/style.css

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
--space: clamp(6px, 6px + 2vw, 15px);
66
--line: 1px solid;
77
--container: 1280px;
8-
--footer-height: 50px;
8+
--footer-height: 80px;
99
}
1010

1111
html,
@@ -30,6 +30,7 @@ body {
3030
display: flex;
3131
flex-direction: column;
3232
overflow: auto;
33+
padding-bottom: var(--footer-height);
3334
}
3435

3536
a {
@@ -52,18 +53,18 @@ article img {
5253
header {
5354
max-width: var(--container);
5455
margin: 0 auto;
55-
padding: var(--space);
56+
padding-bottom: var(--space);
5657
text-align: center;
5758
}
5859

5960
main {
6061
flex: 1;
6162
max-width: var(--container);
62-
margin: 0 auto;
63+
margin: 0 auto calc(var(--space) * 4);
6364
display: grid;
6465
grid-template-columns: 1fr 1fr;
6566
gap: var(--space);
66-
overflow: hidden;
67+
overflow: visible;
6768
padding-bottom: 60px;
6869
}
6970

@@ -72,15 +73,14 @@ main > *:first-child {
7273
}
7374

7475
footer {
75-
height: var(--footer-h);
7676
position: fixed;
77-
left: 0;
7877
bottom: 0;
79-
width: 100%;
80-
padding: var(--space);
81-
text-align: center;
82-
background: var(--paper);
83-
border-top: 1px solid black;
78+
left: 50%;
79+
transform: translateX(-50%);
80+
width: 50%;
81+
height: var(--footer-h);
82+
display: grid;
83+
place-items: center;
8484
box-sizing: border-box;
8585
}
8686

0 commit comments

Comments
 (0)