.gallerycontainer{
position: relative;
/*Add a height attribute and set to largest image's height to prevent overlaying*/
}
.gallerycontainer2{
position: relative; 
/*Add a height attribute and set to largest image's height to prevent overlaying*/
}
.thumbnail img{
border: 1px solid white;
margin: 0 5px 5px 0;
}

.thumbnail:hover{
background-color: blue;
}

.thumbnail:hover img{
border: 0px solid blue;
}

.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
visibility: hidden;
background-color: lightyellow;
padding: 0px;
left: -210px;
/*border: 1px dashed gray;*/
color: black;
text-align: center;
text-decoration: none;
}

.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
margin: 0px;
padding: 0px;
}

.thumbnail:hover span{ /*CSS for enlarged image*/
visibility: visible; 
/* top: -600px;  /*position where enlarged image should offset vertically */
bottom: 150px;  /* or where the bottom should offset vertically */
left: -210px; /*position where enlarged image should offset horizontally */
width: 800px;
z-index: 50;
}
.gallerycontainer2 .thumbnail:hover span{
visibility: visible; 
/* top: -600px;  /*position where enlarged image should offset vertically */
bottom: 150px;  /* or where the bottom should offset vertically */
left: -480px; /*position where enlarged image should offset horizontally */
width: 800px;
z-index: 50;
}
