Centering category images in a Joomla article

Phoca Gallery - image gallery extension
ben1265
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 05 Sep 2026, 20:49

Centering category images in a Joomla article

Post by ben1265 »

I have a Joomla article and would like to display images from a Phoca Gallery. The version of the Plugin is 6.1.1. The problem is that the image grid is left aligned, which is not very attractive. I want the grid to be centered. I have played with CSS to achieve this but I haven't gotten anywhere.
It seems to ne having the image grid centered would be what most people would want. Is that not possible using the Phoca Gallery plugin?
User avatar
christine
Phoca Hero
Phoca Hero
Posts: 3036
Joined: 28 Nov 2010, 17:20

Re: Centering category images in a Joomla article

Post by christine »

Yes, unfortunately, .pg-categories-items-box, .pg-category-items-box, etc., do not work with the usual: margin: 0 auto, .... etc.

#pg-msnr-container-a3-p1 {
margin: 0 auto;
padding-left: 4rem;
}
It only works with the addition: -a3-p1
(depends on what’s shown there in the inspector)


`margin: 0 auto;` doesn’t work either.

Try this first:
General Settings > PG Centered > Yes.

Phoca Gallery has a younger sister called Phoca Photo. Phoca Photo displays Phoca Gallery images in a modern way. Using Bootstrap, or—with the Phoca Photo Content Plugin—also using flexbox to center them.
See the example here:
https://www.phoca.cz/phocacart

The photos below are centered using flexbox; everything was done with the Phoca Photo Content plugin: https://www.phoca.cz/phoca-photo-content-plugin

Kind regards,
Christine
Post Reply