ARTICLE AD BOX
Add min-width: 650px; to the class .col .
It forces the .col element to wrap if it reached the selected width, and you can edit the number in min-width selector to tell when it should wrap (Become in column) and not be squeezed. Here's the entire code edited (With other improvements to make the cols have auto width in vertical mode):
You have a lot of extra CSS that is not needed in regards to the HTML you posted. For simplicity of answering your question, I have removed any CSS that was not used by the HTML.
The basic issue is that at the end of the day, you need to provide some sort of width on the "col" classes. Flexbox won't know to wrap them if there isn't some defined width you are trying to display.
1,6683 gold badges25 silver badges49 bronze badges
1 Comment
Hello, I apologize for the excess code, as I wasn't sure what was or wasn't needed. Anyways, this doesn't seem to have fixed the problem, at least on the website I'm using (Neocities) instead of just stacking the content on mobile, it all remains on one line together and stretches the container box outside of the viewport. I remain a little frustrated, since at the beginning, it seemed as if my code worked just fine, but after a certain point just broke and did not work again. I'm not sure what the problem might be.
2026-04-20T05:22:11.703Z+00:00
flex-direction:column should be removed from .container class and flex-direction need to be specify on @media query. max-width: 100% should be on @media query. flex-direction: column property should be added on .row class in @media query.
Explore related questions
See similar questions with these tags.

