This seems like this would be a javascript issue. On click the Javascript is doing all the work, so I doubt it's in the CSS.

Just inform me with a few things though, on click, does the JS add any classes to it? The caption I mean. If so, check if any postioning is different there.

You also have invalid HTML, a <div> nested within an inline element such as the <span> It's possible that's causing the error. I'd fix up the HTML along with any other validation errors first. No point trying to fix a page if it has major errors in it :).