title: Making an svg image object clickable with onclick, avoiding absolute positioning
body: <p>I have tried to change the images on my site from <code>img</code> to <code>svg</code>, changing <code>img</code> tags to <code>embed</code> and <code>object</code> tags. But, implementing the <code>onclick</code> function, which previously was contained in the <code>img</code> tag, is proving most difficult.</p>
  
  <p>I found <code>onclick</code> had no effect when placed inside the <code>object</code> or <code>embed</code> tag.</p>
  
  <p>So, I made a <code>div</code> exclusively for the svg, and placed <code>onclick</code> in this <code>div</code> tag.  But, no effect unless visitor clicks on the edges/padding of the image.</p>
  
  <p>I have read about overlaying a <code>div</code>, but am trying to avoid using <code>absolute</code> positioning, or specifying <code>position</code> at all.</p>
  
  <p>Is there another way to apply onclick to a svg?</p>
  
  <p>Has anyone encountered this problem? Questions and suggestions are welcome.</p>