*{box-sizing:border-box;}
div.gallery{
    width:100%;
    text-align:center;
}
.gallery img {
    height: auto;
    width:31%;
}
.gallery img:active{
    border:solid black 1px;
    cursor: pointer;
    width:32%;
}
