I tried to make a masonry alignment with 3 columns. However, the first column sometimes will go over to the second column. Can you help to explain this?
SCSS Code:
.masonry { /* Masonry container */
column-count: 3;
column-gap: 1em;
@media(max-width: 768px){
column-count: 2;
}
@media(max-width: 480px){
column-count: 1;
}
.uk-card { // Masonry bricks or child elements
margin: 0 0 1em;
}
}
You can check the masonry test here: https://jsfiddle.net/nnx8fzL2/1/
When to resize the screen to a certain width, the first column will go over the second one.