Last element in gallery misaligned
-
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)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Last element in gallery misaligned’ is closed to new replies.