I am displaying some images of different sizes along multiple rows. Example here
But there are gaps between the lines. I tried a lot but couldn't find the reason.
<div class="muralBox"> <div class="wrapper"> <div v-for="(topAlbum, i) in topAlbumInfo.value" :key="topAlbum.name" class="albums"> <Album :info="topAlbum" :width="layoutConfig[i].width"/> </div> </div> </div>
In Album.vue
<img :src="img" :width="width" :height="width" alt=""/>
and CSS:
.muralBox { margin: auto; max-width: 400px; min-width: 400px; } .wrapper { background: #1f1c2c; display: flex; flex-wrap: wrap; }
I'm not sure if this is exactly what you want because I can't see how you style them, but I just gave the images 100% height and width, which is basically done in codepen .
CodePen link