I want to show 3 column masonry image grid on Desktop and single column on device. Following plunk works on mobile but it fails on Desktop (lot of gap between two images). I have tried setting width in percent but no luck
https://plnkr.co/edit/g75ClJU4VJWgJbfiKYdu?p=preview
.block{
float: left;
margin: 2px 2px 2px 2px;
width: calc(33.33% - 17px);
}
.block img {
width: 100%;
height: auto;
}
@media only screen and (max-width: 500px) {
.block {
float: left;
margin-bottom: 25px;
width: calc(100% - 17px);
}
}
Thanks in advance
MSK
You will probably want to only make use of media queries and remove
float.The design below is very flexible and allows for
The rest of the comments are inside the snippet.