User:Muchos/Snippets/How to simulate an infobox image caption

The problem
It's easy to make an image caption for an infobox template:

The problem is the caption tag won't be displayed if the Image value is a gallery:

A solution: simulating the caption tag
Template

CSS

Now i can use the same wikicode as above for making an infobox with an image gallery and an image caption.

"But I don't want to lose the usual caption tag!"
In this case, you should rename the parameter of the simulated caption; typically "caption2". Example: