• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Space between images

New Here ,
Sep 29, 2017 Sep 29, 2017

Copy link to clipboard

Copied

Hi, on this site, on the mobile version, I have a small space between the images which I can't get rid off!!

EVISSI

Does someone have any idea??

Views

446

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 29, 2017 Sep 29, 2017

That small horizontal space is the browser default text descender padding for inline elements.

Essentially, because your images are inline elements, there is a small bit of padding for any text that would be next to them for the "leg" of the lower case letters that fall below the line, like "y" or "j", that way, the visual bottom of the rest of the text lines up correctly with the bottom of the image.

There are a few ways to fix it, they all have their pros and cons.

The easiest is to create a clas

...

Votes

Translate

Translate
Community Expert ,
Sep 29, 2017 Sep 29, 2017

Copy link to clipboard

Copied

That small horizontal space is the browser default text descender padding for inline elements.

Essentially, because your images are inline elements, there is a small bit of padding for any text that would be next to them for the "leg" of the lower case letters that fall below the line, like "y" or "j", that way, the visual bottom of the rest of the text lines up correctly with the bottom of the image.

There are a few ways to fix it, they all have their pros and cons.

The easiest is to create a class/selector with vertical-align:bottom and then add that to those images. Another would be to change all images to block elements with img {display:block;} at the top of your css, though doing that might have unexpected results where you need to turn other images back to inline-block.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 29, 2017 Sep 29, 2017

Copy link to clipboard

Copied

LATEST

Ahaaa, just did it and it seems to be o.k. (preview in browser), thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines