Highlighted

Space between images

New Here ,
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??

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

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.

Views

214

Likes

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

Space between images

New Here ,
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??

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

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.

Views

215

Likes

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
Sep 29, 2017 0
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Sep 29, 2017 0
Mobos LATEST
New Here ,
Sep 29, 2017

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Sep 29, 2017 0