#instafeed {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    overflow: hidden;
}

/* iPhone 6 ----------- */
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation : portrait) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 45.7vw;
        width: 45.7vw;
        margin-bottom: 0;
        border: solid white 1px;
    }
}


@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation : landscape) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 38vw;
        width: 38vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}

/* iPhone 6 + ----------- */
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation : portrait) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 45.9vw;
        width: 45.9vw;
        margin-bottom: 0;
        border: solid white 1px;
    }
}


@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation : landscape) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 38vw;
        width: 38vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}

/* Desktops and laptops ----------- */
@media only screen  and (min-width : 1224px) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 20vw;
        width: 20vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}

@media only screen  and (min-width : 1366px) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 18.7vw;
        width: 18.7vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}

/* Large screens ----------- */
@media only screen  and (min-width : 1500px) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 16vw;
        width: 16vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}

@media only screen  and (min-width : 1824px) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 20vw;
        width: 20vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}



/* Samsung Galaxy S3 ----------- */
@media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation : landscape) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 35vw;
        width: 35vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}

@media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation : portrait){
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 45.7vw;
        width: 45.7vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}

/* iPads (landscape) ----------- */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 25vw;
        width: 25vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}

/* iPads (portrait) ----------- */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
    #instafeed img, #instafeed video {
        display: inline;
        object-fit: cover;
        height: 39.5vw;
        width: 39.5vw;
        margin-bottom: 0;
        border: solid white 2px;
    }
}




#instafeed .columns { height: 500px !important; line-height: 500px !important; }
#instafeed .columns img, #instafeed .columns video { vertical-align: middle !important; }
@media only screen and (max-width: 767px) {
    #instafeed .columns { height: 100% !important; line-height: auto !important; }
    #instafeed .columns img, #instafeed .columns video { vertical-align: top !important; }
}
@media only screen and (min-width: 960px) {
    #instafeed .columns { height: 400px !important; width: auto!important; line-height: 400px !important; }
    #instafeed .columns img, #instafeed .columns video { vertical-align: middle !important; }
}
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    #instafeed .columns { height: 300px !important; line-height: 300px !important; }
    #instafeed .columns img, #instafeed .columns video { vertical-align: middle !important; }
}