How can a developer fix A two-column layout should become one column on small screens. on a admin panel without changing the HTML?

CSS Published Updated 0 Views Verified
Problem: A two-column layout should become one column on small screens. Context: This CSS troubleshooting question uses a admin panel example. Correct approach: Use a media query to change the grid template at a breakpoint. Working CSS: @media (max-width:768px) { .layout { grid-template-columns:1fr; } }
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

@screen small { .layout { columns:1; } }
Additional Explanation
This approach does not directly implement the required CSS behavior.
Sarkari Resultess
Editorial Answer 1
Verified

B. Incorrect CSS alternative

@mobile { .layout { display:one; } }
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

@media (max-width:768px) { .layout { grid-template-columns:1fr; } }
Additional Explanation
Use a media query to change the grid template at a breakpoint.
Sarkari Resultess
Editorial Answer 3
Verified

D. Another incorrect approach

@media mobile { .layout { width:1; } }
Additional Explanation
This does not address the underlying CSS layout or styling issue.
Sarkari Resultess
Editorial Answer 4