-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Weird Blue Underline when incorporating badge using <Object> Tag #9797
Comments
I think you're mixing and matching 2 concepts. There are some badges where the SVG itself includes one or two links, but that functionality (and lots of other SVG functionality) is disabled if you embed them with an In environments where you're allowed to use the <object data="https://img.shields.io/badge/Send%20a%20Message-Contact-orange?style=for-the-badge&link=https%3A%2F%2Fwww.dylanravel.com%2Fcontact"></object> and the links embedded in the SVG will work. Separately from that, you can embed any badge using an <a href="https://www.dylanravel.com/contact">
<img alt="Website" src="https://img.shields.io/badge/Send%20a%20Message-Contact-orange?style=for-the-badge">
</a> tl;dr: replace your code with <a href="https://www.dylanravel.com/contact">
<img alt="Website" src="https://img.shields.io/badge/Send%20a%20Message-Contact-orange?style=for-the-badge">
</a> and it will do what you want with no rendering issues. |
@chris48s I incorporated your changes, and it still has rendering issues. Can you tell if it is something else causing it? Let me know! https://github.com/DylanDevelops/DylanDevelops/blob/main/README.md |
If you look at it in dev tools, that underline is indicating some whitespace is a link. I suspect this is a quirk of the way you're mixing and matching html and markdown. I'd try replacing it with either <a href="https://www.dylanravel.com/contact"><img alt="Website" src="https://img.shields.io/badge/Send%20a%20Message-Contact-orange?style=for-the-badge"></a> or [![Website](https://img.shields.io/badge/Send%20a%20Message-Contact-orange?style=for-the-badge)](https://www.dylanravel.com/contact) |
This fixed it! Thank you so much! |
Are you experiencing an issue with...
My own instance of shields
🐞 Description
Reading the documentation, it said that I could add a link that the user can go to when clicking the badge by incorporating the image inside of an object tag. I did just that and the button is now clickable, however, it has a weird link underline that shows up.
Is there any way to get rid of this? Am I incorporating the object tag incorrectly? Let me know!
This is the code I have:
🔗 Link to the badge
README File In Which this Occurs: https://github.com/DylanDevelops/DylanDevelops
💡 Possible Solution
I tried adding
text-decoration: none
to the link inside of the object tag but it is still there.The text was updated successfully, but these errors were encountered: