@keyframes slidy {
0% { left: 0%; }
20% { left: 0%; }
25% { left: -100%; }
45% { left: -100%; }
50% { left: -200%; }
70% { left: -200%; }
75% { left: -300%; }
95% { left: -300%; }
100% { left: -400%; }
}
body { margin: 0;}
figure {
margin: 0;
display:inline-block;
vertical-align:middle;
}
#captioned-gallery {
width: 100%;
overflow: hidden;
max-height:400px;
font-weight: 100;
}
figure.slider {
position: relative; width: 500%;
font-size: 0;
animation: 40s slidy infinite;
vertical-align:middle;
}
figure.slider figure {
width: 20%; height: auto;
display: inline-block;
position: inherit;
vertical-align:middle;
}
figure.slider img {
width: 100%;
display: inline-block;
position: inherit;
vertical-align:middle;
overflow: hidden;
}
#captioned-gallery figcaption {
position: absolute; top: 280px;
background: rgba(0,0,0,0.4);
color: #fff; width: 100%;
font-size: 1rem; padding: .6rem;
}
#captioned-gallery figure div {
position: absolute; top: 5%;
background:none;
width:100%;
text-align:center;
}
@media only screen and (max-width: 800px) {
	#captioned-gallery figcaption {
	position: absolute;
	top: 150px;
	background: rgba(0,0,0,0.4);
	color: #fff; width: 100%;
	font-size: 1rem; padding: .6rem;
	}
}