C# – how to get cursor:pointer on an embedded object


1) I am trying to place a transparent image over an embedded object. I am missing positions, relative and absolute, somewhere. But where?

I am actually placing the transparent image because I cannot use cursor:pointer for the object embed. So my idea was to place a transparent image and use cursor:pointer.

2) Why doesn't onclick work in IE? It works fine in Firefox and Chrome.

<div id="divmarquee" runat="server" >
     <img id="imgtrans" runat="server" src= "/images/480x75-blank-transparent" title="Click Here" style="position:relative" />
           <object width="475px" height="75px" onclick="window.location='http://www.google.com'; return false;">
                 <embed src="merchant_images/The_Marquee_Dealn.swf" type="application/x-shockwave-flash" style="z-index: 0; cursor:pointer" wmode="transparent" width="475px" height="75px"> 

Thanks in advance!

Best Solution

With your given code, add the position values to position: relative on #divmarquee, and change position to position: absolute and add cursor: pointer on #imgtrans:

#divmarquee { position: relative; }
#imgtrans { position: absolute; cursor: pointer; }

See here: http://jsfiddle.net/blineberry/pJZ2t/