How can I make a two-column layout collapse to one column at a breakpoint?
Quick answer
Define one column as the default grid, then use a width-based media query to change the grid to two columns when the content has room. Choose the breakpoint by narrowing the layout and watching for cramped text, awkward wrapping, or squeezed content—not by assuming a particular device needs a particular width. The example below uses a placeholder breakpoint; adjust it for your content.
The question, the details, the next step.
A practical checklist
Make the one-column grid the default layout.
Use a width-based media query to change the grid track definition to two columns.
Replace the example breakpoint with a value tested against your own content.
Inspect the layout just below and above the breakpoint for cramped columns or awkward wrapping.
Repeat the check with representative long headings and full content blocks.
A few more useful answers
Should I choose the breakpoint based on a phone or tablet width?
Choose it based on when your content or layout starts to feel cramped, rather than aiming at a particular device size. [S1]
Is 42rem the correct breakpoint for every two-column layout?
No. It is only an example value. Test your own content and adjust the threshold to the point where the two-column arrangement stops working well.
Does this example change the layout to one column at the breakpoint?
The example starts with one column and switches to two at the stated minimum width. Below that width, the one-column default remains in effect.
Sources
References used for this guide.
- [S1] Media query fundamentals - Learn web development | MDN developer.mozilla.org · Checked
