Finally: How i can center images in Phoca Gallery Image Module?

Phoca Gallery modules - modules for Phoca Gallery extension
Forelli
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 16 Apr 2017, 10:31

Finally: How i can center images in Phoca Gallery Image Module?

Post by Forelli »

Hi

I have now been searching for a couple of hours and i didn't found a reliable solution. I hope someone here can give me a easy solution for a problem, that many people have.

How can i center the images-block from in the Phoca Gallery Image Module? Without a fixed width (mobile/responsive usage) and also for both designs/module types. By default, it is left.

Thanks in advace

Best regards
Forelli
christine
Phoca Hero
Phoca Hero
Posts: 2723
Joined: 28 Nov 2010, 17:20

Re: Finally: How i can center images in Phoca Gallery Image Module?

Post by christine »

Hi,

in principle, there exist: #phocagalllery-module-ri with: text-align:center; margin: 0 auto;
Depends also on width of images, templates etc.

Checking resp. giving more information, you could provide us with your URL Thanks.

Kind regards, Christine
Forelli
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 16 Apr 2017, 10:31

Re: Finally: How i can center images in Phoca Gallery Image Module?

Post by Forelli »

Hi

Thank you for this quick answer.

This is the my Test-Website: https://ihorse.ch I would like to center the gallery in the lower area, for "normal" and the responsive view. I have try with the phocagallery.css (/media/mod_phocagallery_image/css)

#phocagallery-module-ri .phocagallery-box-file-d {
position:relative;
float:left; ==> Change to flot:center;
border:1px solid #E8E8E8;
background:#fcfcfc;
text-align:center;
overflow:visible;
width:640px;
height:480px;

..but there is no visible change on the site.

I have found different "#phocagalllery-module-ri". I think that's a reason why there are so many postings about this problem. Sometimes the solutions are referencing to the module, sometimes to the component. The exact path is rarely specified and a detailed guide is missing. I think that would help a lot of people..

Thanks!

Regards
Forelli
christine
Phoca Hero
Phoca Hero
Posts: 2723
Joined: 28 Nov 2010, 17:20

Re: Finally: How i can center images in Phoca Gallery Image Module?

Post by christine »

Hi Forelli,

wir können hier jetzt deutsch weiter machen, da URL deutsch :-) Bestimmte Passagen schreibe ich für andere User (gekürzt) noch englisch dazu.

a) floaten kannst Du nur: float:left; oder float:right; ein float:center; gibt es nicht.
b) zentrieren, meistens mit (entweder/oder): margin:0 auto; / margin:auto; / text-align-center;
c) Einige Einstellungen kann man im PG Module machen: Erweiterungen > Module > Image Module.

Forelli wrote: 17 Apr 2017, 09:32The exact path is rarely specified and a detailed guide is missing. I think that would help a lot of people..
Weiters: liegt es am Template und (auch) am SPbuilder. Deswegen kann man hier nicht einen exakten "guide" machen.
Außerdem wie oben gesagt, liegt es auch daran, wieviele Fotos man nebeneinander hat. Oder: Manche User haben das Modul IN einem Modul usw. Da könnte man wiederum mit einem Modul-Suffix es direkt ansprechen usw. .....

Würde folgendes vorschlagen: Folgenden Code in Deine custom.css geben (/templates/jl_mark_pro/css/custom.css) da Du ein framework hast & Änderungen bei einem Update weg wären. Just add following code to your custom.css, as you are using framework - and also to avoid overwritten CSS after an update.

Code: Select all

.pg-cv-box-mod-ri {
	float: left;
	margin-left: 3.2px !important;
	max-width:100%;
	}
Da sind dann schmale weiße Streifen (vom Hintergrund) "dazwischen" und würde auch meinen, dass dies auch besser aussieht. Weil die 12 Fotos kleben ja irgendwie zusammen ...

Liebe Grüße, Christine
Post Reply