Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extra space under img #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sunyiming
Copy link

No description provided.

@amphineko
Copy link
Owner

Hello, thanks for your contribution.

Could you provide me a live example that reflects your changes?

@sunyiming
Copy link
Author

Take this page for an example. On Chrome 92, the size of <picture> element is 329.6 x 333.6 px, but the size of its child element <img> is 329.6 x 329.6 px, which leave space under the <img> element. It will be more obviously if you change the avatar to a black image.

I think adding vertical-align attribute to <img> element may fix this bug.

@amphineko
Copy link
Owner

What do you think if it's better to fix using flex.

@sunyiming
Copy link
Author

It also works.

I found stackoverflow discussion about it: https://stackoverflow.com/questions/5804256/image-inside-div-has-extra-space-below-the-image

@amphineko amphineko closed this Dec 9, 2021
@amphineko amphineko reopened this Dec 10, 2021
@vercel
Copy link

vercel bot commented Dec 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

atomicneko-next – ./

🔍 Inspect: https://vercel.com/amphineko/atomicneko-next/66oNW7hBr3JZ3CLB65CkQ4roQ6aX
✅ Preview: Failed

atomicneko – ./

🔍 Inspect: https://vercel.com/amphineko/atomicneko/2xRMrMfcJqgLMZxAqgFncQriqrYm
✅ Preview: Failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants