.thumbnail{
position: relative;
display: inherit;
z-index: 0;
cursor: zoom-in;
transition: 0.3s;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: #ddeeff;
padding: 5px;
border: 2px solid gray;
visibility: hidden;
color: black;
text-decoration: none;
text-align: left;
}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 0px;
}
.thumbnail:active span{ /*CSS for enlarged image on hover or active*/
visibility: visible;
}

.thumbnailhover{
position: relative;
z-index: 0;
cursor: zoom-in;
transition: 0.3s;
}
.thumbnailhover:hover{
background-color: transparent;
z-index: 50;
}
.thumbnailhover span{ /*CSS for enlarged image*/
position: absolute;
background-color: lightyellow;
padding: 0px;
left: -1000px; 
border: 1px solid gray;
visibility: hidden;
color: black;
text-decoration: none;
}
.thumbnailhover span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 0px;
}
.thumbnailhover:hover span{ /*CSS for enlarged image on hover or active*/
visibility: visible;
}
