Skip to content

Commit 2bc154c

Browse files
committed
fix padding and footer styling
1 parent fdf3f51 commit 2bc154c

1 file changed

Lines changed: 29 additions & 4 deletions

File tree

Wireframe/style.css

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,57 @@ As well as useful links to learn more */
2424
--line: 1px solid;
2525
--container: 1280px;
2626
}
27+
2728
/* ====== Base Elements ======
2829
General rules for basic HTML elements in any context */
2930
body {
3031
background: var(--paper);
3132
color: var(--ink);
3233
font: var(--font);
3334
}
35+
3436
a {
3537
padding: var(--space);
3638
border: var(--line);
3739
max-width: fit-content;
3840
}
41+
3942
img,
4043
svg {
4144
width: 100%;
4245
object-fit: cover;
4346
}
47+
4448
/* ====== Site Layout ======
4549
Setting the overall rules for page regions
4650
https://www.w3.org/WAI/tutorials/page-structure/regions/
4751
*/
52+
header {
53+
text-align: center;
54+
padding: calc(var(--space) * 2) var(--space);
55+
}
56+
4857
main {
4958
max-width: var(--container);
5059
margin: 0 auto calc(var(--space) * 4) auto;
60+
padding-bottom: calc(var(--space) * 8);
5161
}
62+
5263
footer {
5364
position: fixed;
5465
bottom: 0;
66+
left: 0;
67+
right: 0;
5568
text-align: center;
69+
background: var(--paper);
70+
border-top: var(--line);
71+
padding: var(--space) 0;
72+
73+
.red-text {
74+
color: red;
75+
}
5676
}
77+
5778
/* ====== Articles Grid Layout ====
5879
Setting the rules for how articles are placed in the main element.
5980
Inspect this in Devtools and click the "grid" button in the Elements view
@@ -65,10 +86,12 @@ main {
6586
display: grid;
6687
grid-template-columns: 1fr 1fr;
6788
gap: var(--space);
68-
> *:first-child {
89+
90+
>*:first-child {
6991
grid-column: span 2;
7092
}
7193
}
94+
7295
/* ====== Article Layout ======
7396
Setting the rules for how elements are placed in the article.
7497
Now laying out just the INSIDE of the repeated card/article design.
@@ -80,10 +103,12 @@ article {
80103
text-align: left;
81104
display: grid;
82105
grid-template-columns: var(--space) 1fr var(--space);
83-
> * {
106+
107+
>* {
84108
grid-column: 2/3;
85109
}
86-
> img {
110+
111+
>img {
87112
grid-column: span 3;
88113
}
89-
}
114+
}

0 commit comments

Comments
 (0)