Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drop down menu hidden behind javascript slider

Currently my nav menu's drop down portion is being hidden behind the javascript slider I have directly below it. See the problem here. How can I have the drop down menu display over the slider?

Here is some of the CSS for the two divs that contain the respective nav menu and slider.

Nav Menu:

#nav {
width:1024px;
height:20px;
border-bottom:1px solid #ccc;
}

Slider:

#slider {
width:1024px;
height:300px;
background: #353A33;
padding-bottom:5px;
}

Any ideas?

like image 910
Nick Avatar asked Dec 28 '11 03:12

Nick


2 Answers

Try adding a z-index to your .dropdown class:

 /* Navigation Style */
.dropdown {
  position:relative;
  font-family: arial, sans-serif;
  height:50px;
  width:100%;
  font-size:14px;
  color:#ffffff;
  background:#353A33;
  z-index:1000;
} 
like image 132
Cyclonecode Avatar answered Nov 09 '22 02:11

Cyclonecode


use position:absolute with highest z-index on your nav

like image 37
epi.clyce Avatar answered Nov 09 '22 02:11

epi.clyce