Skip to content

Commit 4a99774

Browse files
authored
Enhance layout and styling in style.css
Added flexbox layout to body and adjusted footer styles.
1 parent 0a28a44 commit 4a99774

1 file changed

Lines changed: 40 additions & 12 deletions

File tree

Wireframe/style.css

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,71 @@ As well as useful links to learn more */
1616
https://web.dev/articles/min-max-clamp
1717
https://scrimba.com/learn-css-variables-c026
1818
====== Design Palette ====== */
19+
20+
* {
21+
margin: 0;
22+
box-sizing: border-box;
23+
}
24+
1925
:root {
20-
--paper: oklch(7 0 0);
21-
--ink: color-mix(in oklab, var(--color) 5%, black);
22-
--font: 100%/1.5 system-ui;
23-
--space: clamp(6px, 6px + 2vw, 15px);
24-
--line: 1px solid;
25-
--container: 1280px;
26+
--paper: oklch(7 0 0);
27+
--ink: color-mix(in oklab, var(--color) 5%, black);
28+
--font: 100%/1.5 system-ui;
29+
--space: clamp(6px, 6px + 2vw, 15px);
30+
--line: 1px solid;
31+
--container: 1280px;
2632
}
2733
/* ====== Base Elements ======
2834
General rules for basic HTML elements in any context */
2935
body {
30-
background: var(--paper);
31-
color: var(--ink);
32-
font: var(--font);
36+
background: var(--paper);
37+
color: var(--ink);
38+
font: var(--font);
39+
display: flex;
40+
flex-direction: column;
41+
align-items: center;
42+
gap: 2rem;
3343
}
3444
a {
35-
padding: var(--space);
36-
border: var(--line);
37-
max-width: fit-content;
45+
padding: var(--space);
46+
border: var(--line);
47+
max-width: fit-content;
3848
}
3949
img,
4050
svg {
4151
width: 100%;
4252
object-fit: cover;
4353
}
54+
p {
55+
margin-bottom: 0.5rem;
56+
}
57+
h1 {
58+
margin-bottom: 1rem;
59+
}
60+
h2 {
61+
margin-bottom: 0.8rem;
62+
}
4463
/* ====== Site Layout ======
4564
Setting the overall rules for page regions
4665
https://www.w3.org/WAI/tutorials/page-structure/regions/
4766
*/
4867
main {
4968
max-width: var(--container);
5069
margin: 0 auto calc(var(--space) * 4) auto;
70+
min-height: 0;
71+
}
72+
header {
73+
text-align: center;
5174
}
5275
footer {
5376
position: fixed;
5477
bottom: 0;
5578
text-align: center;
79+
border-top: 2px solid rgb(158, 158, 158);
80+
padding: 1rem;
81+
min-width: 100%;
82+
background-color: rgb(54, 53, 53);
83+
color: white;
5684
}
5785
/* ====== Articles Grid Layout ====
5886
Setting the rules for how articles are placed in the main element.

0 commit comments

Comments
 (0)