Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

Change flex-direction for mobile layout

$
0
0

I have 3 divs (A, B, C) where A is positioned at left and BC are positioned at right.pic 1But for mobile layout I want to have them positioned like the image below...where C is positioned at left and AB are at rightpic 2

for the first pic I had this code implemented

.container { display: flex; align-items: center; justify-content: space-between;}@media screen and (max-width: 600px){    .container {      flex-direction: row-reverse;    }}
<div class="container"><div class="A">A</div><div class="container"><div>B</div><div>C</div></div></div>

But for mobile devices I tried using flex-direction but it isn't giving me the expected output. any suggestions?


Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>