Search code examples
htmlwebclick

I embedded this html button on my website but it doesn't work


What could be the possible reasons?

<!-- # # Code # # -->
<div class="link-item-wrapper">
<a href="https://www.instagram.com/thestackoverflow/" >
<img src="https://www.instagram.com/static/images/ico/apple-touch-icon-76x76-precomposed.png/666282be8229.png" >
</div>
<!-- # # # # # # # -->

Observations:

  1. Button is clickable but does nothing...
  2. Middle Mouse button works and opens the website correctly.
  3. hovering the mouse shows the website correctly in the bottom left corner.

Solution

  • It works for me in firefox, but you should explicitely close the a tag after the img.

    <div class="link-item-wrapper">
    <a href="https://www.instagram.com/thestackoverflow/">
    <img src="https://www.instagram.com/static/images/ico/apple-touch-icon-76x76-precomposed.png/666282be8229.png">
    </a>
    </div>