Closed MariuzM closed 4 years ago
I know this is lame should be a simple CSS but can't seem to get it working. Where the blue background is it's just empty space i want the images to be centered
<div className="grid"> <Masonry className="portfolio-main" elementType="div" options={masonryOptions} disableImagesLoaded={false} updateOnEachImageLoad={false} > {state.map((el) => { // console.log(el) return ( // <a href={`img/${page}/${el}`}> <img src={`img/${page}/${el}`} className="grid-item" alt="" width="200px" /> // </a> ) })} </Masonry> </div>
css - what i have tried
.portfolio-main { display: flex; align-items: center; justify-content: center; align-content: center; background-color: rgba(0, 0, 255, 0.123); }
Sorted from here https://github.com/eiriklv/react-masonry-component/issues/31
I know this is lame should be a simple CSS but can't seem to get it working. Where the blue background is it's just empty space i want the images to be centered
css - what i have tried