Number of elements per flexbox line

0

I comment. I have a div with 4 ancle elements (the typical buttons to share on social networks) which are distributed thanks to the father (the div) has the flexbox property.

As you know, when rescaling the page so that it adapts to lower screen resolutions, if the elements do not fit, flexbox makes the element that can not be lowered to the bottom line (if the parent has flex-wrap: wrap), and this is where the problem lies.

I would like it when the last of the four buttons does not fit, instead of just downloading that to the bottom line, lower the last 2. That is, they stay 2 up and 2 down. I have tried to give the second of the 4 elements margin-right to spare by a media query to 380px (the measure that suits me) and so if it works, but I found it a little shabby, that's why my question.

Does anyone know how to do this in a not so sloppy way? Thanks.

    
asked by jose_smt 12.04.2017 в 21:15
source

0 answers