Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #983564

    Hello there!

    I’ve made a simple gallery with different image sizes.
    The images right now align to the left and top of their boxes, but i want them to be centered horizontal.
    I’m really looking forward to your help!

    Thanks in advance,
    Vincent

    • This topic was modified 6 years, 5 months ago by intimadecom.
    #983655

    Hey intimadecom,

    Thank you for using Enfold.

    This css code should center align the gallery items.

    #top div .avia-gallery img {
        margin: 0 auto;
        float: none;
        position: relative;
        display: block;
    }

    Best regards,
    Ismael

    #983713

    Thank you very very much Ismael!
    And now… One more important question, i’m desperate :|

    Is there a way to achieve that the vertical gap between the rows orientates to the largest image of the previous row?

    • This reply was modified 6 years, 5 months ago by intimadecom.
    #983747

    Or alternatively – Center them also in their vertical position, as shown on that screenshot…

    Thanks in advance!

    • This reply was modified 6 years, 5 months ago by intimadecom.
    #983958

    Hi,

    Thank you for the update.

    Use the following css code to center align the images vertically.

    #top div .avia-gallery img {
        left: 50%;
        float: none;
        position: absolute;
        display: block;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    
    #top .avia-gallery .avia-gallery-thumb a {
        position: relative;
    }

    Best regards,
    Ismael

    #984107

    Thank you soooo much, that worked out!

    The last question (hopefully) is how can I align the gallery to the horizontal center on mobile screens? See private content.

    Thank you for your great job.

    • This reply was modified 6 years, 5 months ago by intimadecom.
    #984146

    Problem solved! Thank you anyway! :-)

    Used this

    .avia-gallery-thumb {
    width: 100%;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    #984170

    Hi intimadecom,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.