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

CSS Keep all flexbox children elements the same size

$
0
0

My code is shown in this JSFiddle:

#container {    align-content: flex-start;    background-color: red;    display: flex;    flex-flow: row wrap;    height: 200px;    justify-content: space-around;    padding: 10px;    width: 400px;}.child-item {    background-color: yellow;    flex-basis: 75px;    flex-grow: 1;    height: 20px;    margin: 10px;    width: 75px;}
<div id="container"><div class="child-item"></div><div class="child-item"></div><div class="child-item"></div><div class="child-item"></div><div class="child-item"></div><div class="child-item"></div></div>

flexbox grid

Although, I would like the two items across the bottom to have the same with as the items on the top.

I don't want to float them left and fix their width, this will not work for my arrangement in other resolutions.


Viewing all articles
Browse latest Browse all 1326

Trending Articles



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