Which CSS technique should be used when Flex items need consistent spacing without adding margins to individual children. happens in a registration form?

CSS Published Updated 0 Views Verified
Problem: Flex items need consistent spacing without adding margins to individual children. Context: This CSS troubleshooting question uses a registration form example. Correct approach: Use the gap property on the flex container. Working CSS: .row { display:flex; gap:12px; }
Looking for the latest Sarkari Result 2026 updates? Check the latest government exam results, merit lists and result updates on Sarkari Resultess.
Sarkari Resultess
Questions & Answers

Answer & Explanation

4 Answers
Verified

A. Common but incorrect approach

Use padding:12px on the container
Additional Explanation
This approach does not directly implement the required CSS behavior.
Sarkari Resultess
Editorial Answer 1
Verified

B. Incorrect CSS alternative

Use border-spacing:12px
Additional Explanation
This is not a valid CSS property or does not solve the stated problem.
Sarkari Resultess
Editorial Answer 2
Verified Correct Answer

C. Correct CSS solution

.row { display:flex; gap:12px; }
Additional Explanation
Use the gap property on the flex container.
Sarkari Resultess
Editorial Answer 3
Verified

D. Another incorrect approach

Use line-height:12px
Additional Explanation
This does not address the underlying CSS layout or styling issue.
Sarkari Resultess
Editorial Answer 4