White border under gallery images

  • Unknown's avatar

    For a post I made recently, all the images (posted using the Gallery block) now have a white line under them. This seems to be suggestive of the fact that they link to the images, but none of my previous posts have this and they still show the full images on a click. I do not know of anyway to disable that bar or the links for that matter.

    How can I get rid of that white line under images?

    WP.com: Yes
    Correct account: Yes

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Somehow you’re latest post has extra elements, it has the figure, a list, the link and another figure.

    On your previous posts the images only have figure and link.

    If you are able to edit them to just have the figure and link the line on the bottom will go away.

  • Unknown's avatar

    Thank you, I think I see what you mean in the HTML. That’s bizarre though, why is that happening now? I just use the block system normally and don’t add anything fancy. I’d rather not have to go and mess with the code every single time from now on.

  • Hi there,

    That line is being added because the images are linked – that border is being added for the link, rather than for the images/gallery.

    To unlink the images, edit the post, click on each image in turn, and set the Link To setting to None in the block settings in the sidebar:

    https://d.pr/i/3gwI3G

    Once you’ve done that for all your images, update the post and that border should be gone.

    Please DO NOT delete the HTML creating a list as suggested above. That list-HMTL tags are how image galleries work, and removing that will completely break your gallery, while doing nothing to remove the border being added by the link.


    @enile8
    ,

    Thanks for trying to help.

    The block editor is designed in such a way that it should never be necessary to edit HTML directly, and manually modifying the HTML for any block apart from the Custom HTML block is more likely to completely break the block than fix what you’re trying to fix :)

    So if you find yourself wanting to suggest manually editing HTML, first go back and make absolutely sure you’ve diagnosed the issue correctly, and whether it can’t be fixed using the settings the block already has available.

    In this case I used the browser inspector to inspect the images, which indicates a white box-shadow being applied below links (<a>):

    https://d.pr/i/uPSZJd

    There’s no such styling, nor any border being applied to the <li> tags.

  • The topic ‘White border under gallery images’ is closed to new replies.