Keyword

Center gallery in article

  • trogladyte
  • trogladyte's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 5 months ago #148988 by trogladyte
Center gallery in article was created by trogladyte
I read another post that confirmed that no centering is incorporated in the gallery. So how do I accomplish this using CSS? I tried:
<p style="text-align: center;">{gallery}grade58{/gallery}</p>
<div style="100%; margin: 0 auto;">{gallery}grade58{/gallery}</div>
<div style="100%; margin-left: auto; margin-right: auto;">{gallery}grade58{/gallery}</div>

Neither of these worked, but this one did. The drawback it's not responsive.
<div style="820px; margin-left: auto; margin-right: auto;">{gallery}grade58{/gallery}</div>

I thought this would be simple, but alas.... :-)

URL: www.ckdev.info/atonement/school/middle-school-5-8/grade-5-6

Thanks.

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #149005 by Lefteris
Replied by Lefteris on topic Center gallery in article
Hi,

It should be as simple as :
<div style="margin: 0 auto;">{gallery}grade58{/gallery}</div>

Note that this will center the container element of the gallery. It will not align the thumbnails inside the container.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • trogladyte
  • trogladyte's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 5 months ago #149024 by trogladyte
Replied by trogladyte on topic Center gallery in article
Centering the gallery is what I actually want. I was using a div as I thought that would work. sigplus has an option in the plugin to center, but it can't handle the large images I have (I have teacher uploading images so I have to assume they'll snap, upload and not worry about image size).

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #149036 by Lefteris
Replied by Lefteris on topic Center gallery in article
Has the code i provided worked for you?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • trogladyte
  • trogladyte's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 5 months ago #149046 by trogladyte
Replied by trogladyte on topic Center gallery in article
It didn't center the gallery, no.

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #149061 by Lefteris
Replied by Lefteris on topic Center gallery in article
I checked your site and the gallery is centered. The thumbnails are not. Adding this code will solve your issue:
ul.sigFreeClassic { text-align: center;}
ul.sigFreeClassic li.sigFreeThumb { float:none; display:inline-block;}

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • trogladyte
  • trogladyte's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 5 months ago #149077 by trogladyte
Replied by trogladyte on topic Center gallery in article
That did it - thanks!

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #149087 by Lefteris
Replied by Lefteris on topic Center gallery in article
You are welcome.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum