Reputation: 431
I have this logo
<img src="images/logo.png" style="margin-top: 7px; margin-left: 10px;width: 80px;" alt="">
now to add a link pn this image i use the plain old method
<a href="google.com"> <img src="images/logo.png" style="margin-top: 7px; margin-left: 10px;width: 80px;" alt=""> </a>
However this doesn't seem to work, Nothing happens on the image and it is not even clickable. Am I missing something? Should I try another way around ?
Upvotes: 0
Views: 1481
Reputation: 2689
Add http://
for all external link.
check below snippet, you can't open google
in iframe
, so I changed the URL to stackoverflow
<a href="http://stackoverflow.com"> <img src="images/logo.png" style="margin-top: 7px; margin-left: 10px;width: 80px;" alt=""> </a>
Upvotes: 2
Reputation: 687
try this :
<a href="http://google.com" id="myimage" onclick="document.location=this.id+'.html';return false;"> <img src="images/logo.png" alt="myimage"/> </a>
Upvotes: 1