DEV Community 👩‍💻👨‍💻

Discussion on: Need help with CSS Flexbox

Collapse
 
zelcus profile image
Zelcus • Edited on

Well since you set direct pixel values on your widths they will always remain that size. A section with a width 450px will always have a width of 450px no matter what the screen size is.

So trhe solution is remove all the hard-coded values with an exact set width.
You also want to add these rules to the parent class for your sections.
** display: flex;
flex-wrap: wrap; **

And to the section classes:
** flex: 0 50%; **

I also see no point in having your two sections with two different class names since you want them to behave the same.

Collapse
 
lolleri200 profile image
lolleri200 Author

Thanks for the help, but it didn't seem to work. The page is still not scaling.
codepen.io/Sampsa96/pen/oNxzrMW