Image URLs: clickable boundaries extend beyond image

  • Unknown's avatar

    I’m not sure why, but whenever I add a link to an image, the clickable URL section is not bound by the image’s width, and extends far beyond it. I’m able to open links while my cursor is nowhere near the actual image URL intended.

    Is there a way to get the URL properties to properly stay bound to the limits of the image?

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

  • Unknown's avatar

    Assuming you’re referring to your Image widgets: edit them and set the alignment to left instead of none.

  • Unknown's avatar

    Thanks! That definitely fixed the image widgets, but what about image links in posts (e.g. Download PDF buttons)? It seems to not be an issue when an image is aligned left, but when centered the problem persists?

    I might just need to align them left and cheat to get them centered somehow.

  • Unknown's avatar

    You’re welcome.
    Yes, aligncenter is like alignnone: they both mean no text wrap, i.e. a full-width block (no matter what the actual width of the image). To fix the centered images in the posts you need to modify their coding: you can delete the align command altogether and add a substitute. Switch the editor to Text (=code) and turn this:
    <img class="aligncenter size-full ETC ETC
    to this:
    <img style="margin:1.5em auto;" class="size-full ETC ETC

  • Unknown's avatar

    Excellent! Tweaking the text code worked. Problem solved.

    Thanks again :)

  • Unknown's avatar

    You’re welcome!
    (I understand you changed 1.5em to .5em on purpose; and you understand I suggested the value that simulated the exact default vertical spacing of centered images.)

  • The topic ‘Image URLs: clickable boundaries extend beyond image’ is closed to new replies.