Board Thread:Support Requests - Getting Technical/@comment-1295676-20150824023315/@comment-4731443-20150824053907

Okay, I think we can use theme-source to our advantage here. I will let you implement the changes needed, in part because you need to edit the wiki's custom CSS, and in part to assess the risks and benefits.

First, add this paramater to your infobox: theme-source="image gallery" As you may have read in the documentation, this will replace your theme="blue" when image gallery is specified and use its value as a class name instead.

Second, add this to your custom CSS: .pi-theme-yes section:last-child div:first-of-type { display: none; } According to my local test, that should select the extra empty div container at the end of the infobox and hide it. I called the class .pi-theme-yes since "yes" is the value you use to display galleries. Of course, you could use a separate parameter, but I figured it would be redundant.

Third, you may have noticed a bit of a problem here. For one, .pi-theme-yes will completely override .pi-theme-blue, so you will need to copy any styling you had for .pi-theme-blue over to .pi-theme-yes so it applies to both. But there's also the fact that if someone enters any value other than "yes" for your image gallery parameter, your infobox will try to reference a class that doesn't exist and will display the default infobox style.

I leave it up to you to determine whether this is a non-issue since you can easily fix a page where a wrong value was entered for that parameter, or whether you would rather avoid that potential slip altogether.

As a sidenote, if you do use it, I would suggest using a value other than "yes" for that parameter from now on so your infobox class gets a more meaningful name, for example, pi-theme-showgallery, but that's just for the sake of clarity in the long run. :)