Unexpected underline for image link when hovering #27

Open
opened 2025-10-14 16:13:17 -06:00 by navan · 0 comments
Owner

Originally created by @ReinforceZwei on 3/14/2023

Example html code to reproduce the problem:

<p>
    <a href="https://github.com">
	<img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&amp;logo=github&amp;logoColor=white" alt="">
    </a>
</p>

img-hovering

I think the problem is margin-bottom.
image

The problem could be resolved by removing the margin-bottom style, or reset the margin-bottom style if the <img> tag is used inside a <a> tag.

*Originally created by @ReinforceZwei on 3/14/2023* Example html code to reproduce the problem: ```html <p> <a href="https://github.com"> <img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&amp;logo=github&amp;logoColor=white" alt=""> </a> </p> ``` ![img-hovering](https://user-images.githubusercontent.com/39955851/225007031-a6d28b7a-3561-4f4e-92bd-d1d839d9fa29.gif) I think the problem is `margin-bottom`. ![image](https://user-images.githubusercontent.com/39955851/225007431-ab125525-80a6-4019-9230-497e97a8e656.png) The problem could be resolved by removing the `margin-bottom` style, or reset the `margin-bottom` style if the `<img>` tag is used inside a `<a>` tag.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/sakura#27
No description provided.