Home>Support>Extra space – images not flush with bottom border – solution

Extra space – images not flush with bottom border – solution

By Rich, 6 years ago. Last reply by Rich, 6 years ago.

I ran into the same problem alicel22 posted about, where I’m getting a 5px space between the bottom of an image and the edge of the containing div. Alex S had provided some suggestions, but he didn’t sound hopeful and that was the end of that thread.

I checked on Stack Overflow and found a solution that appears to work.

According to the Stack Overflow explanation, the space is because the img tag has the default display: inline style, which causes the div to reserved some space at the bottom for descender elements (e.g. g, y, j). Changing the img tag style to display: block fixes the problem (the image in the image widget is now flush with the bottom).

I’m all set as I’ll add the style as some custom CSS. I’m posting the solution in case someone else is having the same problem.

Rich

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 6 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Rich,

    I’m glad you were able to resolve this issue. I’m sorry I wasn’t able to be of assistance this time. You were correct about the linked thread – I didn’t think my reply was going to help and I needed more information to proceed. Please be sure to post another thread if you have any other questions.

  2. 6 years, 6 months ago Rich

    Hi Alex,

    Thanks for replying. One other note about the gap below an image – I was playing with the generic image widget before and that styles the image as display: inline. I’ve since tried the Site Origin image widget and that styles the image as display: block (a better widget).

    And thanks for making Vantage, Page Builder, the CSS editor, and the Widgets Bundle available.

    Rich

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More