how to turn a menu into a dropdown menu?

Viewed 44

How to turn the next menu into a Dropdown menu?

At the moment the menu is not closed and opens

Thanks

Example: enter image description here

                array('visible'=>$this->AA('withdrawal'),'tag'=>'withdrawal',
               'label'=> '<i class="fa fa-university"></i>'.Yii::t("default",'Withdrawal'),
               'itemOptions'=>array('class'=>''), 
               'items'=>array(        
                 array('visible'=>$this->AA('incomingwithdrawal'),'tag'=>'incomingwithdrawal',
                 'label'=>'<i class="fa fa-paypal"></i>'.Yii::t("default","Withdrawal List"), 
                 'url'=>array('admin/incomingwithdrawal')),                                
                 
                  array('visible'=>$this->AA('withdrawalsettings'),'tag'=>'withdrawalsettings',
                  'label'=>'<i class="fa fa-paypal"></i>'.Yii::t("default","Settings"), 
                 'url'=>array('admin/withdrawalsettings')),                                   
             )),
1 Answers

you can use of this code:

.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  padding: 12px 16px;
  z-index: 1;
}
.dropdown:hover .dropdown-content {
  display: block;
}
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="dropdown">
  <span>settings</span>
  <div class="dropdown-content">
  <p>profile</p>
  <p>security</p>
  <p>Account</p>
  </div>
</div>
</body>
</html>

Related