Board Thread:Support Requests - Designing Your Wikia/@comment-26731725-20151120110435/@comment-4731443-20151120224454

selects the first  element in the infobox. Having it twice means I look for the first div, then the first div in that one. That results in selecting the div that contains the image caption. Note that things would be different if there were more data before your image, but for most infoboxes, where you have title > image > caption, this will work.

These are the first tags that show up in this common structure: aside (infobox) (selected by .pi-theme-book) -h2 (title) -figure (image container) --a (image link) ---img (image) -div (caption row) (selected by the first div:first-of-type) --div (caption container) (selected by the second div:first-of-type) -div (data row) --div (data container) ...

For themes, you should read Help:Infoboxes/CSS.