Support » Theme: Hoffman » Last element in gallery misaligned

  • Resolved seindal

    (@seindal)


    Hi,

    I’ve been playing with this theme for an ancient site I’m migrating to wordpress.
    There are lots of one line galleries, with two, three or four photos.

    For some reason the last element was always aligned lower than the other images, or stretched to go lower.

    After some research I found the culprit in this CSS rule:

    .post-content ol > li:last-child,
    .post-content ul > li:last-child {
    	margin-bottom: 0;
    }

    which removes a margin on the last element. I’ve added this rule to my child theme and it’s resolved.

    .post-content .wp-block-gallery ol > li:last-child,
    .post-content .wp-block-gallery ul > li:last-child {
    	margin-bottom: auto;
    }

    I’m quite sure there’s a better and more elegant way to resolve this, but it’s late.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @seindal,

    Thanks for posting! This should be fixed in version 1.28, which was just submitted and should be live shortly.

    — Anders

    seindal

    (@seindal)

    Thanks for a prompt reply and fix.

    • This reply was modified 8 months ago by seindal.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Last element in gallery misaligned’ is closed to new replies.