PrepAway - Latest Free Exam Questions & Answers

You have the following markup.

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:

2 Comments on “You have the following markup.

    1. _mr says:

      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

Leave a Reply