Make every cell span two columns.
Acceptance criteria
- 1.Make every cell span two columns.
CSS Tutorial · CSS Grid
These 10 tasks go with the Grid Placement 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: “Place items by numbered lines, named lines, and spans while keeping the source order meaningful. You will place items with numbered and named lines, spans, negative line numbers, overlapping cells, and source-order safeguards.” .
1.Span two columnsexercise · easy · 10 min
Make every cell span two columns.
Passes when: Make every cell span two columns.
2.Start at a specific lineexercise · easy · 10 min · practice plan
Place the cells starting at column line 2.
Passes when: Place the cells starting at column line 2.
3.Span two rowsexercise · easy · 10 min · practice plan
Make every cell span two rows.
Passes when: Make every cell span two rows.
4.Place with start and endexercise · easy · 10 min · practice plan
Place cells from column line 1 to line 3.
Passes when: Place cells from column line 1 to line 3.
5.Align one itemexercise · medium · 10 min · practice plan
Use justify-self to push cells to the end of their track.
Passes when: Use justify-self to push cells to the end of their track.
6.Fix the missing span keywordbug fix · easy · 8 min
Spanning tracks needs the span keyword.
Passes when: Spanning tracks needs the span keyword.
7.Fix the wrong axisbug fix · easy · 8 min · practice plan
The span was applied to rows instead of columns.
Passes when: The span was applied to rows instead of columns.
8.Fix the placement on the containerbug fix · easy · 8 min · practice plan
grid-column applies to items, not the container.
Passes when: grid-column applies to items, not the container.
9.Fix the wrong separatorbug fix · easy · 8 min · practice plan
A start/end range uses a slash.
Passes when: A start/end range uses a slash.
10.Fix justify-items used on an itembug fix · easy · 8 min · practice plan
An individual item uses justify-self.
Passes when: An individual item uses justify-self.
Between them these tasks cover grid-column, grid-row and span.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.