How can persist div overflow on scale

86 views Asked by At

In this snipet

I'm trying to persist the DIV visibility over other DIVs. On hover event, it scales-in the entire container but after it return on the previous dimensions

enter image description here

1

There are 1 answers

3
Ovidiu Unguru On

I found a way of fixing it by using flexbox

I added the flexbox to the #columns id and used flex-wrap:wrap. Also added a width to the .pin class.

@media (min-width: 960px) {
    #columns {
        display: flex;
        flex-flow: wrap;
    }
}

.pin {
    //other code
    width: 23%;
}

Example: https://jsfiddle.net/7zofwyau/5/