Reputation: 29
I have a page top containing two menus. The problem is that when one of the submenus is unwrapped, it doesn't show (the other menu covers it). I've tried with z-index but it doesn't work. Thanks in advance. The page and the code are avaliable in http://infoglobal.eu1.frbit.net/En/cap.php.
Upvotes: 1
Views: 59
Reputation: 6938
Your html and CSS is messed up a bit
#top{
z-index:13 //This is not needed
}
.menu{
z-index: 10 //This is also not needed
}
#canvi_idioma{
z-index:1 //Simply add this
}
Upvotes: 1
Reputation: 1798
In your css you use z-index on '.menu' but that affects both menus. You have to apply it to #menu and #canvi_idioma.
Also note that z-index only works when both elements are within the same parent node.
Also your code is kinda dirty. You may want to clean up things like this with position beeing in there two times:
#canvi_idioma {
background: transparent;
position: absolute;
right: -95%;
top: 40px;
position: relative;
}
Upvotes: 0
Reputation: 951
Apply z-index to #canvi_idioma
CSS
#canvi_idioma{
z-index:9999
}
Upvotes: 0
Reputation: 192
You can use z-index with position.
css example
.Class{
position:relative; //You have to choose atleast one position type.
z-index:100; // value can be change according to you .
}
Upvotes: 0