Home > database >  DIV with higher z-index hides on clicking on div with lower z index containing Silverlight object
DIV with higher z-index hides on clicking on div with lower z index containing Silverlight object

Time:12-25

I have 2 divs inside a form and I want one div to be always floating above other. The div with id "help" displays a help button. When I navigate to the page, the help div is on top of the second div but if I click anywhere on the second div the first div hides. if I resize the window it appears again.

NOTE: the second div expands to full width and height of the parent.

<body>
 <form id="form1" runat="server" style="height:100%; display:flex; flex-
    flow:column; ">
    <div id="help" style="position:absolute; z-index:1;">
    </div>
    <div style="position:absolute;z-index:0;">
      <!-- Here there is a Silverlight component -->
    </div>
 </form>
</body>

CodePudding user response:

The solution to this was setting "Windowless" to true in silverlight object.

 <param value="true" name="windowless"/>

According to microsoft documentationin windowless mode, the Silverlight plug-in does not have its own rendering window. Instead, the plug-in content is displayed directly by the browser window. This enables Silverlight content to visually overlap and blend with HTML content.

https://technet.microsoft.com/pt-br/library/cc838156(v=vs.95).aspx

  • Related