.gallery{
    max-width: 400px;
    text-align: center;
    margin: 0 auto; 
}

.photo{
    position: relative;
    height: 400px;
}

.photo img{
    width: 100%;
    position: absolute;
    opacity: 0;
    left: 0;
    transition: opacity 1s;
}

.photo img.shown{
     opacity: 1;
}

.tabs{
    text-align: center;
    padding-top: 20px;
    position: relative;
}
.tabs .left{
    position: absolute;
    top: -200px;
    left: -60px;
    cursor: pointer;
}
.tabs .right{
    position: absolute;
    top: -200px;
    right: -60px;
    cursor: pointer;
}
@media only screen and (max-width:540px){
    .tabs .left{
        top: 0;
        left: 50px
    }
    .tabs .right{
        top: 0;
        right: 50px
    }
}
@media only screen and (max-width:370px){
    .photo img{
        bottom: 70px
    }}