One column by default, three from 700px up.
Acceptance criteria
- 1.One column by default, three from 700px up.
CSS Tutorial · CSS Responsive Design
These 10 tasks go with the Mobile First Design 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: “Mobile First Design is a web development approach where a website is designed and developed for mobile devices first, then progressively enhanced for larger screens.” .
1.Start with one columnexercise · easy · 10 min
One column by default, three from 700px up.
Passes when: One column by default, three from 700px up.
2.Scale type upwardsexercise · easy · 10 min · practice plan
14px by default, 20px from 700px up.
Passes when: 14px by default, 20px from 700px up.
3.Stack first, row laterexercise · easy · 10 min · practice plan
Stack #grid in a column, switching to a row from 700px up.
Passes when: Stack #grid in a column, switching to a row from 700px up.
4.Grow the spacingexercise · easy · 10 min · practice plan
12px of padding by default, 32px from 700px up.
Passes when: 12px of padding by default, 32px from 700px up.
5.Build a mobile-first blockexercise · medium · 10 min · practice plan
Single column with 12px padding, becoming three columns with 32px from 700px.
Passes when: Single column with 12px padding, becoming three columns with 32px from 700px.
6.Fix the desktop-first stylesheetbug fix · easy · 8 min
The three-column layout is the base, so phones get it too.
Passes when: The three-column layout is the base, so phones get it too.
7.Fix the enhancement reaching phonesbug fix · easy · 8 min · practice plan
An enhancement is guarded with min-width, not max-width.
Passes when: An enhancement is guarded with min-width, not max-width.
8.Fix the missing base rulebug fix · easy · 8 min · practice plan
With the layout only inside the query, phones get no layout at all.
Passes when: With the layout only inside the query, phones get no layout at all.
9.Fix the oversized base spacingbug fix · easy · 8 min · practice plan
The generous desktop padding should be the enhancement, not the default.
Passes when: The generous desktop padding should be the enhancement, not the default.
10.Fix the row that should stackbug fix · easy · 8 min · practice plan
Phones should stack; the row belongs behind the breakpoint.
Passes when: Phones should stack; the row belongs behind the breakpoint.
Between them these tasks cover Base styles for small screens, min-width enhancements and Progressive layout.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.