I have about 6 divs containing text and images. They all vary in length but are the same width. I therefore want to display like Pinterest which I have achieved.
However, the divs are split over multiple columns. How do I stop this from happening? The CSS I have used is below the image.
.masonry {
margin: 1.5em 0;
-moz-column-gap: 1.5em;
-webkit-column-gap: 1.5em;
column-gap: 1.5em;
}
.masonry .feedback-box{
display: inline-block !important;
width: 100% !important;
}
@media only screen and (min-width: 400px) {
.masonry {
-moz-column-count: 1;
-webkit-column-count: 1;
column-count: 1;
}
}
@media only screen and (min-width: 700px) {
.masonry {
-moz-column-count: 2;
-webkit-column-count: 2;
column-count: 2;
}
}
@media only screen and (min-width: 900px) {
.masonry {
-moz-column-count: 3;
-webkit-column-count: 3;
column-count: 3;
}
}