I've been working on creating a slideshow using CSS, HTML, and Javascript. Everything seems to be running smoothly, but I've noticed that when I click on the next or previous buttons, the current image enlarges and lingers on the screen for a few seconds. Although I've set the width of the images in my CSS to 100%, I suspect that the issue may be related to margins, even though they don't appear to be the source of the problem.
Below is some code snippets that might provide more insight into the issue:
figure
{
position:absolute;
opacity:0;
transition:1s opacity;
margin:0;
border-left:solid 2px black;
border-right:solid 2px black;
}
figure.show
{
opacity:1;
position:relative;
transition:1s opacity;
margin-right:15%;
margin-left:15%;
}
Another issue I've encountered is a gap between the image and the bottom div. Interestingly, I haven't experienced this problem while working on c9.io, which makes me wonder if there's something specific to CodePen that is causing it.
You can view the code here: http://codepen.io/iikinz/pen/BiLeJ