You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: client/i18n/locales/english/intro.json
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2072,7 +2072,8 @@
2072
2072
"review-css-flexbox": {
2073
2073
"title": "CSS Flexbox Review",
2074
2074
"intro": [
2075
-
"Review the CSS Flexbox concepts to prepare for the upcoming quiz."
2075
+
"Before you are quizzed on CSS Flexbox concepts, you first need to review.",
2076
+
"Open up this page to review concepts like the <code>flex-direction</code>, <code>justify-content</code>, <code>align-items</code>, <code>flex-wrap</code> properties and more."
Copy file name to clipboardExpand all lines: curriculum/challenges/english/25-front-end-development/review-css-flexbox/671a940c69cdee833d4cc312.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,46 @@ dashedName: review-css-flexbox
9
9
10
10
Review the concepts below to prepare for the upcoming quiz.
11
11
12
+
## Introduction to CSS Flexbox and Flex Model
12
13
14
+
-**Definition**: CSS flexbox is a one-dimensional layout model that allows you to arrange elements in rows and columns within a container.
15
+
-**Flex Model**: This model defines how flex items are arranged within a flex container. Every flex container has two axes: the main axis and the cross axis.
16
+
17
+
## The `flex-direction` Property
18
+
19
+
-**Definition**: This property sets the direction of the main axis. The default value of `flex-direction` is `row`, which places all the flex items on the same row, in the direction of your browser’s default language (left to right or right to left).
20
+
-**`flex-direction: row-reverse;`**: This reverses the items in the row.
21
+
-**`flex-direction: column;`**: This will align the flex items vertically instead of horizontally.
22
+
-**`flex-direction: column-reverse;`**: This reverses the order of the flex items vertically.
23
+
24
+
## The `flex-wrap` Property
25
+
26
+
-**Definition**: This property determines how flex items are wrapped within a flex container to fit the available space. `flex-wrap` can take three possible values: `nowrap`, `wrap`, and `wrap-reverse`.
27
+
-**`flex-wrap: nowrap;`**: This is the default value. Flex items won’t be wrapped onto a new line, even if their width exceed the container's width.
28
+
-**`flex-wrap: wrap;`**: This property will wrap the items when they exceed the width of their container.
29
+
-**`flex-wrap: wrap-reverse;`**: This property will wrap flex items in reverse order.
30
+
-**`flex-flow` Property**: This property is a shorthand property for `flex-direction` and `flex-wrap`. In this example, we set `flex-direction` to `column` and `flex-wrap` to `wrap-reverse`.
31
+
32
+
```css
33
+
flex-flow: column wrap-reverse;
34
+
```
35
+
36
+
## The `justify-content` Property
37
+
38
+
- **Definition**: This property aligns the child elements along the main axis of the flex container.
39
+
- **`justify-content: flex-start;`**: In this case, the flex items will be aligned to the start of the main axis. This could be horizontal or vertical.
40
+
- **`justify-content: flex-end;`**: In this case, the flex items are aligned to the end of the main axis, horizontally or vertically.
41
+
- **`justify-content: center;`**: This centers the flex items along the main axis.
42
+
- **`justify-content: space-between;`**: This will distribute the elements evenly along the main axis.
43
+
- **`justify-content: space-around;`**: This will distribute flex items evenly within the main axis, adding a space before the first item and after the last item.
44
+
- **`justify-content: space-evenly;`**: This will distributes the items evenly along the main axis.
45
+
46
+
## The `align-items` Property
47
+
48
+
- **Definition**: This property is used to distribute items along the cross axis. Remember that the cross axis is perpendicular to the main axis.
49
+
- **`align-items: center;`**: This is used to center the items along the cross axis.
50
+
- **`align-items: flex-start;`**: This aligns the items to the start of the cross axis.
51
+
- **`align-items: stretch;`**: This is used to stretch the flex items along the cross axis.
0 commit comments