I have a flexbox that follows the width: calc(100% / 3); css. This fits well in screen if there are over 6 divs. However, I have a filtering system, so potentially the user can filter and show only 2 divs. This then shows a lot of white space, does anyone have any ideas how I can get around this?
On Filter I have tried changing the width, but this goes out of the 3x2 design we are after. Please see the design here http://www.project-progress.co.uk/intersystems/category/finance/#blogs-filter
.tiles .tile {
flex-basis: calc(100% / 2);
width: calc(100% / 3);
position: relative;
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.tiles .tile:nth-child(1n) {
flex-basis: calc(50% / 1);
}
.tiles {
display: flex;
flex-direction: column;
flex-wrap: wrap;
height: 100vh;
overflow: auto;
position: relative;
overflow-x: scroll;
}
dsf
sdf
dsf
sdf
dsf
sdf