Skip to content

Fix extra space under img#42

Open
sunyiming wants to merge 1 commit into
amphineko:masterfrom
sunyiming:master
Open

Fix extra space under img#42
sunyiming wants to merge 1 commit into
amphineko:masterfrom
sunyiming:master

Conversation

@sunyiming
Copy link
Copy Markdown

No description provided.

@amphineko
Copy link
Copy Markdown
Owner

Hello, thanks for your contribution.

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

@sunyiming
Copy link
Copy Markdown
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
Copy Markdown
Owner

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

@sunyiming
Copy link
Copy Markdown
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
Copy Markdown

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