Set the flex direction to column.
Acceptance criteria
- 1.Set the flex direction to column.
CSS Tutorial · CSS Flexbox
These 10 tasks go with the Flex Direction chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “The Flex Direction property is used to define the direction in which flex items are displayed inside a flex container.” Read the chapter.
1.Stack items in a columnexercise · easy · 10 min
Set the flex direction to column.
Passes when: Set the flex direction to column.
2.Reverse the rowexercise · easy · 10 min · practice plan
Set the direction to row-reverse.
Passes when: Set the direction to row-reverse.
3.Reverse the columnexercise · easy · 10 min · practice plan
Set the direction to column-reverse.
Passes when: Set the direction to column-reverse.
4.Use the flex-flow shorthandexercise · easy · 10 min · practice plan
Set direction and wrap together with flex-flow.
Passes when: Set direction and wrap together with flex-flow.
5.Column with a gapexercise · medium · 10 min · practice plan
Stack in a column with a 14px gap.
Passes when: Stack in a column with a 14px gap.
6.Fix the misspelled valuebug fix · easy · 8 min
The value is column, not colum.
Passes when: The value is column, not colum.
7.Fix the wrong propertybug fix · easy · 8 min · practice plan
The property is flex-direction, not direction.
Passes when: The property is flex-direction, not direction.
8.Fix the reverse spelled wrongbug fix · easy · 8 min · practice plan
The value is row-reverse.
Passes when: The value is row-reverse.
9.Fix the direction set on the itemsbug fix · easy · 8 min · practice plan
flex-direction belongs on the container.
Passes when: flex-direction belongs on the container.
10.Fix the missing flex containerbug fix · easy · 8 min · practice plan
flex-direction has no effect without display: flex.
Passes when: flex-direction has no effect without display: flex.
Between them these tasks cover row and column, Reversed directions and Main axis.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.