Create columns of 100px and 200px.
Acceptance criteria
- 1.Create columns of 100px and 200px.
CSS Tutorial · CSS Grid
These 10 tasks go with the CSS Grid Columns 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 CSS Grid Columns property is used to define the number and size of columns in a grid layout.” Read the chapter.
1.Define two fixed columnsexercise · easy · 10 min
Create columns of 100px and 200px.
Passes when: Create columns of 100px and 200px.
2.Define three fixed columnsexercise · easy · 10 min · practice plan
Create three 120px columns.
Passes when: Create three 120px columns.
3.Use repeat with fixed tracksexercise · easy · 10 min · practice plan
Use repeat() to make three 90px columns.
Passes when: Use repeat() to make three 90px columns.
4.Size implicit columnsexercise · easy · 10 min · practice plan
Flow into columns and size the implicit ones at 80px.
Passes when: Flow into columns and size the implicit ones at 80px.
5.Mix column widthsexercise · medium · 10 min · practice plan
Create a 150px column followed by a 50px one.
Passes when: Create a 150px column followed by a 50px one.
6.Fix the comma-separated tracksbug fix · easy · 8 min
Track sizes are separated by spaces, not commas.
Passes when: Track sizes are separated by spaces, not commas.
7.Fix the wrong propertybug fix · easy · 8 min · practice plan
The property is grid-template-columns.
Passes when: The property is grid-template-columns.
8.Fix the repeat syntaxbug fix · easy · 8 min · practice plan
repeat() takes a count then a size, separated by a comma.
Passes when: repeat() takes a count then a size, separated by a comma.
9.Fix the missing unitbug fix · easy · 8 min · practice plan
A bare number is not a valid track size.
Passes when: A bare number is not a valid track size.
10.Fix rows used instead of columnsbug fix · easy · 8 min · practice plan
The tracks were declared on the wrong axis.
Passes when: The tracks were declared on the wrong axis.
Between them these tasks cover grid-template-columns, Fixed tracks and grid-auto-columns.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.