Check out this Fiddle for reference
Is there a way to split the main sections in each row into new lines on mobile phones using media queries, without breaking the image and text apart? I don't want to use display-direction: column;
on .row-flex
as it will break both the image and text. Instead, I want them to split like shown in the provided image.
https://i.sstatic.net/sZuzy.jpg
.row-flex {
display: flex;
}
.col-1 {
flex: 1;
}
.col-2 {
flex: 3;
}
<div class="row-flex">
<a href="#" class="col-1">
<img src="http://placehold.it/90x90">
</a>
<div class="col-2">
<p>text text text text text text text text</p>
</div>
<a href="#" class="col-1">
<img src="http://placehold.it/90x90">
</a>
<div class="col-2">
<p>text text text text text text text text</p>
</div>
</div>