.JesterBox div {
  visibility: hidden;
  position: fixed;
  top: 10%;
  right: 5%;
  bottom: 5%;
  left: 5%;
  z-index: 75;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  color:white;
}

.JesterBox div:before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 74;
  background-color: rgba(0, 0, 0, 0);
  transition: all 0.5s ease-out;
}

.JesterBox div img{
  position: relative;
  z-index: 76;
  max-width: 100%;
  max-height:100%;
  height:auto;
  width:auto;
  opacity: 0;
  transition-property: all, opacity;
  transition-duration: 0.5s, 0.2s;
  transition-timing-function: ease-in-out, ease-out;
}

.JesterBox div:target { visibility: visible; }

.JesterBox div:target:before { background-color: rgba(0, 0, 0, 0.9)}

.JesterBox div:target img {
  margin-left: 0px;
  opacity: 1;
}

div.gallery {
    border: 1px solid #fff;
}

div.gallery:hover {
    border: 1px solid #777;
}

div.box {
	vertical-align: middle;
	display: flex; /* add */
    justify-content: center; /* add to align horizontal */
    align-items: center; /* add to align vertical */
}

div.box img {
	
}


div.desc {
    padding: 5px;
    text-align: center;
	font-size: 70%;
}

* {
    box-sizing: border-box;
}

@media only screen and (max-width : 767px) {
  .box {
    height: auto !important;
  } 
}

.clearfix:after {
    content: "";
    display: table;
    clear: both;
}