Problem with div placement

0

Good afternoon guys,

I'm doing a DropDown menu on a website, I'm having the following difficulty, when I hover over the item, the subitems are below a banner plugin.

Ex: If I put the banner div (display: none), the SubItem appears and goes over the text correctly, but if I go back to Banner Div, the subItem is below the benner image.

In the subitems I am using absolute position, in the rotating banners there are several images with absolute position as well.

Is there a way to define who should stay ahead?

    
asked by anonymous 25.07.2014 / 20:12

4 answers

2

I do not know your code. I would do the following, for example:

.divMae{position:relative; width:500px}
.divFilha{position:absolute;z-index:2; left:50%; margin-left:-250px}

With this, the divFile will appear centered below the divMae. If it does not appear, it can be your z-index, just increase it.

    
25.07.2014 / 20:27
0

So, it's a bit difficult not to see your code, but by answering the question of what div placement is in front, use the "z-index: 10" in css, the 10 is just for example, you can sort from according to which you want to stay ahead. The higher the value in the front the div.

In case you can make your idea available, use this site link , to put some of your code html, css and javascript, there you save your prototype and you make the link available to us and it's easier for everyone to interact.

    
25.07.2014 / 20:28
0

Thank you Felipe Stoker,

With the z-Index it even solved, I had to apply on top of the div div just like you showed.

    
25.07.2014 / 20:31
0

Friend, using z-index you can define how layers are rendered by the browser.

Read this article , it will help you.

    
25.07.2014 / 20:35