C. repeat() requires two arguments: count and size
D. grid-template-columns cannot use repeat()
Solution
Step 1: Check repeat() syntax
The repeat() function needs two arguments: number of times and size, e.g. repeat(3, 1fr).
Step 2: Identify the error
Here, only repeat(3) is given, missing the size argument, so it's invalid.
Final Answer:
repeat() requires two arguments: count and size -> Option C
Quick Check:
repeat() needs count and size [OK]
Hint: repeat() always needs count and size, like repeat(3, 1fr) [OK]
Common Mistakes:
Using repeat() with only one argument
Forgetting to specify display: grid;
Thinking repeat() is invalid in grid-template-columns
5. You want a grid container that has 2 columns: the first column is 150px wide, and the second column fills the remaining space. Which CSS is correct?
hard
A. display: grid; grid-template-columns: 150px auto;
B. display: grid; grid-template-columns: 150px 1fr;
C. display: grid; grid-template-columns: auto 150px;
D. display: grid; grid-template-columns: 1fr 150px;
Solution
Step 1: Understand fixed and flexible columns
150px is fixed width. To fill remaining space, use 1fr which means flexible fraction.
Step 2: Check options
display: grid; grid-template-columns: 150px auto; uses auto which sizes based on content, not remaining space. Options B and D put 150px in wrong column order.
Final Answer:
display: grid; grid-template-columns: 150px 1fr; -> Option B
Quick Check:
Fixed + flexible = 150px 1fr [OK]
Hint: Use 1fr for flexible space after fixed width [OK]
Common Mistakes:
Using auto instead of 1fr for flexible space
Swapping column order
Not setting display: grid;
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.