Page 1 of 1
Centering category images in a Joomla article
Posted: 05 Sep 2026, 20:55
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?
Re: Centering category images in a Joomla article
Posted: 06 Sep 2026, 12:32
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