-
-
Notifications
You must be signed in to change notification settings - Fork 432
Expand file tree
/
Copy pathstyle.css
More file actions
131 lines (111 loc) · 2.32 KB
/
style.css
File metadata and controls
131 lines (111 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/* Here are some starter styles
You can edit these or replace them entirely
It's showing you a common way to organise CSS
And includes solutions to common problems
As well as useful links to learn more */
/* ====== Design Palette ======
This is our "design palette".
It sets out the colours, fonts, styles etc to be used in this design
At work, a designer will give these to you based on the corporate brand, but while you are learning
You can design it yourself if you like
Inspect the starter design with Devtools
Click on the colour swatches to see what is happening
I've put some useful CSS you won't have learned yet
For you to explore and play with if you are interested
https://web.dev/articles/min-max-clamp
https://scrimba.com/learn-css-variables-c026
====== Design Palette ====== */
/* Reset */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
body {
background: #f5f4f4;
color: #000;
line-height: 1.5;
}
/* Header */
.page-header {
text-align: center;
padding: 2rem 1rem;
}
.page-header h1 {
font-size: 2.5rem;
margin-bottom: 0.5rem;
}
.page-header p {
font-size: 1rem;
color: #555;
}
/* Main content */
.content {
max-width: 1100px;
margin: 0 auto;
padding: 1rem;
}
/* Featured article */
.featured {
border: 2px solid #000;
margin-bottom: 2rem;
}
.featured .image {
height: 250px;
border-bottom: 2px solid #000;
}
.image img {
width: 100%;
height: 100%;
object-fit: contain;
}
.featured .text {
padding: 1rem;
}
.featured h2 {
margin-bottom: 0.5rem;
}
/* Article grid */
.grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
}
/* Article cards */
.card {
border: 2px solid #000;
}
.card .image {
height: 200px; /* Keep this or adjust as needed */
width: 100%; /* Added to make the image fit the container */
border-bottom: 2px solid #000;
}
.card .text {
padding: 1rem;
}
.card h3 {
margin-bottom: 0.5rem;
}
/* Footer */
.footer {
position: fixed;
bottom: 0;
width: 100%;
z-index: 1000; text-align: center;
border-top: 1px solid rgb(14, 13, 13) 000;
background-color: #f8ea1e;
}
/* Responsive */
@media (max-width: 768px) {
.grid {
grid-template-columns: 1fr;
}
.featured .image {
height: 220px;
}
}
a {
outline: 1px solid black !important;
padding: 3px !important;
}