DEV Community

lolleri200
lolleri200

Posted on

How to make CSS containers go under each other when on mobile?

I'm trying to make the second container go under the first container when the page is viewed on a tablet or mobile device, but I can't get it to work. So if someone can help that would be great! Code: https://codepen.io/Sampsa96/pen/JjGVwKw

Top comments (5)

Collapse
 
link2twenty profile image
Andrew Bone

I'd suggest looking into flexbox. It's very helpful for this sort of thing.

Collapse
 
link2twenty profile image
Andrew Bone • Edited

Collapse
 
lolleri200 profile image
lolleri200

Is there any other way? Cause I know you can do it without flexbox also.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️ • Edited

I suggest you start by using HTML5 ;)


Also, waaaaay too many media querryes; why not just let the browser decide when to wrap your content?

Collapse
 
lolleri200 profile image
lolleri200

Thanks :)