[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

Solve overlapping issue

Hi Experts,
I have created a web page in ASP.NET , there is google map and on that there are some images.When I place mouse over that image a poup is shown and on right mouse button click on image a context menu ( user defined not of Browser) is displayed.
Context menu is created inside div and also popup window is also on div.To display popup mouseover event is handled and for context menu mouse event is handled.
when I select any image popup shown  and on right click a context menu ( both as per feature) but problem is context menu is hidden behind the popup.I tried to set zindex,for popup I set zindex 0 and for context menu I give zindex 200 ( also test with more).
So please any suggestion how can i prevent this overlapping ?
One solution is by setting  left position of popup less value but in that case look and feel is not good.So any other solution is welcome.

Thanks
0
manujtechno
Asked:
manujtechno
  • 3
1 Solution
 
manujtechnoAuthor Commented:
I tried opacity to show and hide menu but it is also not working..Any one can help me
0
 
manujtechnoAuthor Commented:
Any one have any suggestion or go through such type of situation ..
0
 
BardobraveCommented:
If I've understood you, the problem here is that your popup appears over the menu layer.

I've found this type of problems sometimes and found it were difficult to solve, although sometimes the solution were as easy as changing the order in wich elements are created on the document object model.

When you add subsequent layers one over another, they tend to put over existing ones. If you create all your layers at loading time and show/hide them on client events you should try to create the layers on this order: map --> popups --> menus

If you create and destroy the layers on client execution time your problem could be some CSS related issue, but there is where the real trouble starts, because it could be almost anything in your stylesheet. I would try to disable all the css and try to render my elements on the desired position, them start to enable css files checking that elements doesn't get disordered until I'd be able to found what's happening.

I hope this helps you a bit.
0
 
mreuringCommented:
In case you have not tried, set the first z-index to 1 (0 may not be a valid value).
Second, z-index is only supposed to work on equal levels in the DOM-hierarchy (so if the popup is owned by '<body>' and the popup by a nested '<div>' the z-index won't affect each other)
Additionally both elements must have 'position', either position:absolute; or position:relative will do the trick, depending on your particular use case.

Most of all it would help if you have an example page where we can investigate the issue, as you see I've already come up with several possible scenario's either or all could apply...
0
 
manujtechnoAuthor Commented:
hi,
as per solution given by Bardobrave or by mreuring I already worked on both but i did not get any success.
At last I found the solution that I change the position of tool tip popup by using top and left position of mouse and then using div clientheight and clientwidth value,little bit calculation and finally problem is solved.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now