Reputation: 5761
I have the following codepen: http://codepen.io/AlexanderWeb00/pen/NpKyRm
below 500px I would like to have 2 divs next to each other so I have changed the width to 50%
.container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: auto;
max-width: 960px;
}
// * {
// box-sizing: border-box;
// }
.container__item {
align-content: center;
border: 1px solid #333;
display: flex;
flex-basis: 1;
font-size: 3em;
justify-content: center;
margin-bottom: 1em;
// maintain aspect ratio
width: 24%;
}
@media screen and (max-width: 500px){
.container__item {
width: 50%;
}
}
but they only stuck under each other.
Upvotes: 1
Views: 114