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

Format flex items based on wrap state

$
0
0

I am using Flexbox for following layout and willing to switch to CSS Grid or plain old floats if I can achieve my goal. This questions is very similar these two: detect flex wrap and select an item based on wrap state.

If my viewport has enough space to fit two flex items side by side, my second flex item should be right aligned.

enter image description here

If there isn't enough space, then my second flex item will wrap. But, as that happens, I want to change text alignment from right to left.

enter image description here


Viewing all articles
Browse latest Browse all 1326

Trending Articles



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