Making image clickable inside a clickable div - hyperlinked


How can I get an image to have it's own hyperlink that is inside of a clickable div?

<div id="clickable" onclick="'');return false;">

  <p>I love clickable images!</p>
    <a href=""><img src="someimage.png" /></a>
  <p>too bad they don't click in a clickable div</p>


If I try the above then the DIV is always getting the click, never the image in the div. I can click the image, but the link for the div is what opens. Removing the return false does not help either.

Featured Replies in this Discussion



<img src="img.jpg" onClick="'')" />

i think it should work fine

concise and kind.

I thought I tried that one, but initial tests seem to be that it works.


Question Answered as of 3 Years Ago by baig772
Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

This question has already been solved: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: