CSS CSS Margins Question #8923
MCQ Single Best Answer Easy

QWhich CSS property is used to set the margin for an element to be centered vertically?

ID: #8923 CSS Margins 118 views
Question Info
#8923Q ID
EasyDifficulty
CSS MarginsTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A margin-vertical-center
  • B margin-top-bottom-auto
  • C margin-middle
  • D margin-vertical-auto
Correct Answer: Option B

Explanation

To set the margin for an element to be centered vertically, you can use the margin-top and margin-bottom properties set to "auto".

Share This Question

Challenge a friend or share with your study group.