• Hi,

    I am having issues centring a group of images in the wordpress gallery. All the coding is float: left – I have been playing around with this all day and no luck with inline blocks, text-align, margin: 0 auto;

    Has anyone found a fix? I’ve been working in my theme style.css.

    Any help will be great, as I need to sort asap (As always!)

    Thanks in adnavce

Viewing 4 replies - 1 through 4 (of 4 total)
  • You may need to add custom css classes and/or ids in order to make it work/look the way you want.

    Hope that helps.

    Hi marcia-slk,

    I believe the margin: 0 auto to work you need to remove the float. Okay, I found the source that might help: https://stackoverflow.com/questions/4955122/what-exactly-is-needed-for-margin-0-auto-to-work .

    Hope this helps. If not would you provide the website.

    Cheers!
    John

    @rehabsoup,
    depending on the theme that trick does not always work. I have had headaches with the gallery function too and the only way I was able to resolve them once and for all was to create custom divs and/or ids in the css.

    Thread Starter marcia-slk

    (@marcia-slk)

    Thank you very much for coming back to me – in the end I had to use custom code which the theme developers put together.

    for example..

    <p><center></p><p><a href="#" target="_blank" style="display:inline-block; margin:5px;"><img src="#" alt=“text” width="32" height="32" class="alignnone size-full wp-image-2907" /></a><br /></center></p>

    Hope this helps for future

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to centre wordpress gallery?’ is closed to new replies.