-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
443 lines (395 loc) · 18 KB
/
Copy pathindex.html
File metadata and controls
443 lines (395 loc) · 18 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
<!--
Welcome to our page for flexbox practice
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>freeCodeCampJXN - Flexbox</title>
<link rel="stylesheet" href="css/style.css">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
</head>
<body>
<!-- Here is the logo, the title, and the navbar -->
<header>
<div class="banner">
<a href="https://www.freecodecamp.org">
<img src="assets/freeCodeCamp.png" alt="freeCodeCampLogo" class="logo">
</a>
<a href="https://www.freecodecamp.org/forum/c/united-states-study-groups/jackson">
<h1 class="logo-jackson">freeCodeCamp Jackson, Mississippi</h1>
</a>
<nav>
<ul>
<a href="#levelone" class="header-link">
<li>Level One</li>
</a>
<a href="#leveltwo" class="header-link">
<li>Level Two</li>
</a>
<a href="#levelthree" class="header-link">
<li>Level Three</li>
</a>
<a href="#levelfour" class="header-link">
<li>Level Four</li>
</a>
</ul>
</nav>
</div>
</header>
<!-- The content begins here -->
<main>
<header>
<h1 class="title">Flexbox Tutorial</h1>
<p>See the freeCodeCamp article for a follow along: <mark>
<a href="https://www.freecodecamp.org/news/flexbox-in-10-minutes-7295497804ed/">
Learn basic Flexbox in just 10 minutes</a></mark>
</p>
</header>
<section id="levelone">
<header>
<h3 class="level">Level 1 — Basic</h3>
<hr>
</header>
<div class="subheader">
<h4 class="instruction">1) Creating a flex container</h4>
<p class="code-style">{ display: flex; }</p>
</div>
<div class="flex-container f-c-color">
<div class="flex-items one f-i-color">
<img src="assets/darth_vader.jpg" alt="Luke, I am your father.">
<p>Div One</p>
</div>
<div class="flex-items two f-i-color">
<img src="assets/cookie_monster.jpeg" alt="Cookie! Cookie! Cookie!">
<p>Div Two</p>
</div>
<div class="flex-items three f-i-color">
<img src="assets/captain_planet.jpeg" alt="With our powers combine, we are captain planet!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">2) Put flex items in a single column</h4>
<p class="code-style">{ flex-direction: column; }</p>
</div>
<div class="flex-container2 f-c-color">
<div class="flex-items2 one2 f-i-color">
<img src="assets/darth_vader.jpg" alt="Luke, I am your father.">
<p>Div One</p>
</div>
<div class="flex-items2 two2 f-i-color">
<img src="assets/cookie_monster.jpeg" alt="Cookie! Cookie! Cookie!">
<p>Div Two</p>
</div>
<div class="flex-items2 three2 f-i-color">
<img src="assets/captain_planet.jpeg" alt="With our powers combine, we are captain planet!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<p class="code-style">{ flex-direction: column-reverse; }</p>
</div>
<div class="flex-container3 f-c-color">
<div class="flex-items3 one3 f-i-color">
<img src="assets/darth_vader.jpg" alt="Luke, I am your father.">
<p>Div One</p>
</div>
<div class="flex-items3 two3 f-i-color">
<img src="assets/cookie_monster.jpeg" alt="Cookie! Cookie! Cookie!">
<p>Div Two</p>
</div>
<div class="flex-items3 three3 f-i-color">
<img src="assets/captain_planet.jpeg" alt="With our powers combine, we are captain planet!">
<p>Div Three</p>
</div>
</div>
</section>
<section id="leveltwo">
<header>
<h3 class="level">Level 2 — Beginner</h3>
<hr>
</header>
<div class="subheader">
<h4 class="instruction">1) Align flex items to the right</h4>
<p class="code-style">{ justify-content: flex-end; }</p>
</div>
<div class="flex-container4 f-c-color">
<div class="flex-items4 one4 f-i-color">
<img src="assets/yoda.jpg" alt="You must unlearn what you have learned.">
<p>Div One</p>
</div>
<div class="flex-items4 two4 f-i-color">
<img src="assets/oscar.jpg" alt="You name it! I hate it!">
<p>Div Two</p>
</div>
<div class="flex-items4 three4 f-i-color">
<img src="assets/raphael.jpg" alt="Cowabunga dudes!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">2) Center-align flex items</h4>
<p class="code-style">{ justify-content: center;} </p>
</div>
<div class="flex-container5 f-c-color">
<div class="flex-items5 one5 f-i-color">
<img src="assets/yoda.jpg" alt="You must unlearn what you have learned.">
<p>Div One</p>
</div>
<div class="flex-items5 two5 f-i-color">
<img src="assets/oscar.jpg" alt="You name it! I hate it!">
<p>Div Two</p>
</div>
<div class="flex-items5 three5 f-i-color">
<img src="assets/raphael.jpg" alt="Cowabunga dudes!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">3) Spread out flex items</h4>
<p class="code-style">{ justify-content: space-evenly; }</p>
</div>
<div class="flex-container6 f-c-color">
<div class="flex-items6 one6 f-i-color">
<img src="assets/yoda.jpg" alt="You must unlearn what you have learned.">
<p>Div One</p>
</div>
<div class="flex-items6 two6 f-i-color">
<img src="assets/oscar.jpg" alt="You name it! I hate it!">
<p>Div Two</p>
</div>
<div class="flex-items6 three6 f-i-color">
<img src="assets/raphael.jpg" alt="Cowabunga dudes!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<p class="code-style">{ justify-content: space-between; }</p>
</div>
<div class="flex-container7 f-c-color">
<div class="flex-items7 one7 f-i-color">
<img src="assets/yoda.jpg" alt="You must unlearn what you have learned.">
<p>Div One</p>
</div>
<div class="flex-items7 two7 f-i-color">
<img src="assets/oscar.jpg" alt="You name it! I hate it!">
<p>Div Two</p>
</div>
<div class="flex-items7 three7 f-i-color">
<img src="assets/raphael.jpg" alt="Cowabunga dudes!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<p class="code-style">justify-content: space-around;</p>
</div>
<div class="flex-container8 f-c-color">
<div class="flex-items8 one8 f-i-color">
<img src="assets/yoda.jpg" alt="You must unlearn what you have learned.">
<p>Div One</p>
</div>
<div class="flex-items8 two8 f-i-color">
<img src="assets/oscar.jpg" alt="You name it! I hate it!">
<p>Div Two</p>
</div>
<div class="flex-items8 three8 f-i-color">
<img src="assets/raphael.jpg" alt="Cowabunga dudes!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">4) Align flex items in a second direction</h4>
<p class="code-style">{ justify-content: center; align-items: center; }</p>
</div>
<div class="flex-container9 f-c-color">
<div class="flex-items9 one9 f-i-color">
<img src="assets/yoda.jpg" alt="You must unlearn what you have learned.">
<p>Div One</p>
</div>
<div class="flex-items9 two9 f-i-color">
<img src="assets/oscar.jpg" alt="You name it! I hate it!">
<p>Div Two</p>
</div>
<div class="flex-items9 three9 f-i-color">
<img src="assets/raphael.jpg" alt="Cowabunga dudes!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">5) Align a particular flex item</h4>
<p class="code-style">.flex-container10 {justify-content: center; align-items: center;}</p>
<p class="code-style">.three10 {align-items: flex-end};</p>
</div>
<div class="flex-container10 f-c-color">
<div class="flex-items10 one10 f-i-color">
<img src="assets/yoda.jpg" alt="You must unlearn what you have learned.">
<p>Div One</p>
</div>
<div class="flex-items10 two10 f-i-color">
<img src="assets/oscar.jpg" alt="You name it! I hate it!">
<p>Div Two</p>
</div>
<div class="flex-items10 three10 f-i-color">
<img src="assets/raphael.jpg" alt="Cowabunga dudes!">
<p>Div Three</p>
</div>
</div>
</div>
</section>
<section id="levelthree">
<header>
<h3 class="level">Level 3 — Intermediate</h3>
<hr>
</header>
<div class="subheader">
<h4 class="instruction">1) Allow flex items to wrap into other rows/columns</h4>
<p class="code-style">{ flex-wrap: wrap; }</p>
</div>
<div class="flex-container11 f-c-color">
<div class="flex-items11 one11 f-i-color">
<img src="assets/r2-d2.jpeg" alt="Bleep! Bleep!">
<p>Div One</p>
</div>
<div class="flex-items11 two11 f-i-color">
<img src="assets/elmo.jpg" alt="Elmo's world! La! La! La! La!">
<p>Div Two</p>
</div>
<div class="flex-items11 three11 f-i-color">
<img src="assets/he_man.jpg" alt="I have the power!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">2) Reverse wrapping</h4>
<p class="code-style">{ flex-wrap: wrap-reverse; }</p>
</div>
<div class="flex-container12 f-c-color">
<div class="flex-items12 one12 f-i-color">
<img src="assets/r2-d2.jpeg" alt="Bleep! Bleep!">
<p>Div One</p>
</div>
<div class="flex-items12 two12 f-i-color">
<img src="assets/elmo.jpg" alt="Elmo's world! La! La! La! La!">
<p>Div Two</p>
</div>
<div class="flex-items12 three12 f-i-color">
<img src="assets/he_man.jpg" alt="I have the power!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">3) Justify position of lines of elements</h4>
<p class="code-style"> { flex-wrap: wrap; align-content: flex-start; }</p>
</div>
<div class="flex-container13 f-c-color">
<div class="flex-items13 one13 f-i-color">
<img src="assets/r2-d2.jpeg" alt="Bleep! Bleep!">
<p>Div One</p>
</div>
<div class="flex-items13 two13 f-i-color">
<img src="assets/elmo.jpg" alt="Elmo's world! La! La! La! La!">
<p>Div Two</p>
</div>
<div class="flex-items13 three13 f-i-color">
<img src="assets/he_man.jpg" alt="I have the power!">
<p>Div Three</p>
</div>
</div>
</section>
<section id="levelfour">
<header>
<h3 class="level">Level 4 — Advanced</h3>
<hr>
</header>
<div class="subheader">
<h4 class="instruction">1) Expand elements</h4>
<p class="code-style">.flex-item:nth-of-type(1){ flex-grow: 1;}</p>
<p class="code-style">.flex-item:nth-of-type(2) { flex-grow: 2;}</p>
</div>
<div class="flex-container14 f-c-color">
<div class="flex-items14 one14 f-i-color">
<img src="assets/luke.jpg" alt="No!!!!!!!!No!!!">
<p>Div One</p>
</div>
<div class="flex-items14 two14 f-i-color">
<img src="assets/count.png" alt="One! Two! The number two! Ha aha ha ha!">
<p>Div Two</p>
</div>
<div class="flex-items14 three14 f-i-color">
<img src="assets/link.png" alt="Da-da-da! Daaa!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">2) Shrink elements</h4>
<p class="code-style">.flex-item:nth-of-type(1){ flex-shrink: 1;}</p>
<p class="code-style">.flex-item:nth-of-type(2) { flex-shrink: 2;}</p>
</div>
<div class="flex-container15 f-c-color">
<div class="flex-items15 one14 f-i-color">
<img src="assets/luke.jpg" alt="No!!!!!!!!No!!!">
<p>Div One</p>
</div>
<div class="flex-items15 two15 f-i-color">
<img src="assets/count.png" alt="One! Two! The number two! Ha aha ha ha!">
<p>Div Two</p>
</div>
<div class="flex-items15 three15 f-i-color">
<img src="assets/link.png" alt="Da-da-da! Daaa!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">3) Set the size of elements</h4>
<p class="code-style">.flex-item:nth-of-type(1){ flex-basis: 200px;}</p>
<p class="code-style">.flex-item:nth-of-type(2) { flex-basis: 10%;}</p>
</div>
<div class="flex-container16 f-c-color">
<div class="flex-items16 f-i-color">
<img src="assets/luke.jpg" alt="No!!!!!!!!No!!!">
<p>Div One</p>
</div>
<div class="flex-items16 f-i-color">
<img src="assets/count.png" alt="One! Two! The number two! Ha aha ha ha!">
<p>Div Two</p>
</div>
<div class="flex-items16 f-i-color">
<img src="assets/link.png" alt="Da-da-da! Daaa!">
<p>Div Three</p>
</div>
</div>
<div class="subheader">
<h4 class="instruction">4) Put flex-grow, flex-shrink, and flex-basis together</h4>
<p class="code-style">.flex-item:nth-of-type(1) { flex: 1 0 100px; }</p>
<p class="code-style">.flex-item:nth-of-type(2) { flex: 2 0 10%; }</p>
</div>
<div class="flex-container17 f-c-color">
<div class="flex-items17 f-i-color">
<img src="assets/luke.jpg" alt="No!!!!!!!!No!!!">
<p>Div One</p>
</div>
<div class="flex-items17 f-i-color">
<img src="assets/count.png" alt="One! Two! The number two! Ha aha ha ha!">
<p>Div Two</p>
</div>
<div class="flex-items17 f-i-color">
<img src="assets/link.png" alt="Da-da-da! Daaa!">
<p>Div Three</p>
</div>
</div>
</section>
</main>
<footer>
<h2>Thanks for visiting this tutorial page. FreeCodeCamp Jackson, MS would love to have you join us
at one of our monthly meetings or our more frequent virtual meetings.
</h2>
<h2>Check out the
<a href="https://www.freecodecamp.org/forum/c/united-states-study-groups/jackson/l/calendar">calendar page</a>
on the freeCodeCampJXN page for details.
</h2>
</footer>
</body>
</html>