Skip to content

Commit 85166b1

Browse files
committed
section-7: Generic grid
1 parent fa61171 commit 85166b1

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

starter/07-Omnifood-Desktop/css/style.css

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,29 @@ body {
8686
box-shadow: inset 0 0 0 .3rem #fff;
8787
}
8888

89+
.container {
90+
margin: 0 auto;
91+
max-width: 120rem;
92+
padding: 0 3.2rem;
93+
}
94+
95+
.grid {
96+
display: grid;
97+
gap: 9.6rem;
98+
}
99+
100+
.grid--2-cols {
101+
grid-template-columns: repeat(2, 1fr);
102+
}
103+
104+
.grid--3-cols {
105+
grid-template-columns: repeat(3, 1fr);
106+
}
107+
108+
.grid--4-cols {
109+
grid-template-columns: repeat(4, 1fr);
110+
}
111+
89112
.heading-primary {
90113
color: #333;
91114
font-size: 5.2rem;
@@ -185,8 +208,6 @@ body {
185208
font-weight: 700;
186209
}
187210

188-
189-
190211
.hero {
191212
align-items: center;
192213
display: grid;
@@ -211,3 +232,10 @@ body {
211232
background-color: #fdf2e9;
212233
padding: 4.8rem 0 9.6rem 0;
213234
}
235+
236+
237+
/*** HOW ***/
238+
239+
.section-how {
240+
padding: 9.6rem 0;
241+
}

starter/07-Omnifood-Desktop/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ <h1 class="heading-primary">
6363
</div>
6464
</div>
6565
</section>
66+
67+
<section class="section-how">
68+
<div class="container grid grid--2-cols">
69+
<div>Test 1</div>
70+
<div>Test 2</div>
71+
<div>Test 3</div>
72+
<div>Test 4</div>
73+
</div>
74+
</section>
6675
</main>
6776
</body>
6877
</html>

0 commit comments

Comments
 (0)