Why does the popup menu of my HTML menu display UNDERNEATH my silverlight control?

We have a webpage with an iFrame (which points to a webpage containing a silverlight control). For instance:

<iframe src="http://www.mysite.com/MyFancySilverlightHost.aspx" width="950px" height="600px" style="z-index: 1;"></iframe> 

The problem is that we have a drop-down menu right above this control, and the menu displays the BELOW silverlight control. We would like the menu to appear above the silverlight control. Is it possible?

I tried to set the z-index in the menu to a large number, for example 1000, but this does not affect.

PS: I confirmed this in Chrome and IE8. (firefox works great!)

Any ideas?

+4
source share
2 answers

This was actually a problem in the WindowLess property of the tag that hosted the silverlight control. When set to True, it works like a charm. HTML hangs over the iFrame and over the Silverlight pipeline.

+3
source

The problem is not Silverlight, but the iframe. An IFrame is considered as another window, so if it blocks something on the page below it. The z-index on an iframe really has no effect.

Can you just paste your silverlight object on the page instead of using an iframe?

Or you can change your menu to have an iframe under it, then you can use z-index to get it in front. This is similar to the hack needed to get the z-index for placing items over select boxes in IE6.

0
source

Source: https://habr.com/ru/post/1345714/


All Articles