This repository was archived by the owner on Oct 2, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 461
Expand file tree
/
Copy pathstyles.css
More file actions
109 lines (94 loc) · 1.84 KB
/
styles.css
File metadata and controls
109 lines (94 loc) · 1.84 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
/* HTML/CSS W2 Project
* Work in pairs
* Mark up your content with semantic html
* Lay out your page using flexbox and grid
* Test your work with Devtools.
* You can get pictures and choose custom size in the download at
* https://www.pexels.com/
* If you want to use a different font, get them from
* https://fonts.google.com/
*/
/* Testing your work
== check your CSS
* uses grid
* uses flexbox
* uses at least one media query
== check your HTML
* uses semantic HTML
* has a Lighthouse Access score of 100 <--
* works on desktop and mobile
* works when you size the text up by 200%
== check your design
* follows the example
* you can choose your own colours and fonts if you like
* write your names at the bottom
* take a screenshot at laptop and Moto G4 device sizes in Devtools
*/
body {
font-family: 'Poppins', sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #222;
color: #fff;
padding: 20px;
text-align: center;
}
main {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin: 20px;
}
.card {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: 1fr 2fr;
grid-gap: 10px;
margin: 10px;
border: 1px solid #ccc;
border-radius: 5px;
overflow: hidden;
max-width: 300px;
}
.card img {
width: 100%;
height: auto;
object-fit: cover;
}
.card h2 {
font-size: 1.5rem;
margin: 0;
padding: 10px;
grid-column: 1 / -1;
background-color: #333;
color: #fff;
}
.card p {
margin: 10px;
font-size: 1.1rem;
}
footer {
background-color: #222;
color: #fff;
padding: 20px;
text-align: center;
}
h1, h2, h3 {
font-weight: 700;
margin: 0;
}
@media screen and (max-width: 600px) {
.card {
grid-template-columns: 1fr;
grid-template-rows: 1fr auto 1fr;
max-width: 90%;
}
.card img {
grid-row: 1 / 2;
}
.card h2 {
grid-row: 2 / 3;
}
}