You have the following markup.
You need to ensure that the yellow div is centered in the red div.
What should you do?
A. Add the following code to the yellow div.align-content:center
B. Add the following code to the red div.align-content:center
C. Add the following code to the red div.margin:auto
D. Add the following code to the yellow div.margin:auto
Explanation:
Correct answer is D
https://jsfiddle.net/3ok6w9t7/
8
0
Yep, you are right. D is correct IMO.
The following applied to a parent would work (but not ‘align-content: center’):
align-items: center;
justify-content: center;
0
0