Why is the dropdown menu not visible initially?


#1


Can anyone clue me in to this? What makes the dropdown menu invisible initially?


Replace this line with your code.


#2

Check the style sheet for the dropdown selector rule(s). There may be a rule that contains,

display: none;

This rule will be overridden by the event handler.

Edit: Found this selector rule in the Bootstrap.css file...

.dropdown-menu{
  position:absolute;
  top:100%;
  left:0;
  z-index:1000;
  display:none;
  float:left;
  min-width:160px;
  padding:5px 0;
  margin:2px 0 0;
  font-size:14px;
  text-align:left;
  list-style:none;
  background-color:#fff;
  -webkit-background-clip:padding-box;
  background-clip:padding-box;
  border:1px solid #ccc;
  border:1px solid rgba(0,0,0,.15);
  border-radius:4px;
  -webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);
  box-shadow:0 6px 12px rgba(0,0,0,.175)
}

The event handler toggles the display property for the dropdown-menu.


#3

Many thanks mtf. This was driving me crazy as it wasn't in the style.css sheet!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.