I'm struggling to display a dropdown menu within a panel without it being hidden. I was advised to use position:absolute
in the dropdown's css, but that solution isn't working for me.
I need the dropdown to appear on hover over the anchor tag and also when clicking the button, without hiding any of the content.
<body id="body">
<div class="col-lg-5 col-md-4">
<div class="panel panel-default" id="panel2">
<div class="panel-heading-fd">
<h3 class="panel-title-fd">Our Products</h3>
</div>
<div class="panel-body">
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" src="img/2.jpg" style="width: 150px;
height: 70px;">
</a>
<div class="media-body">
<h4 class="media-heading"><a href="#">Dropdown</a></br>
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data- toggle="dropdown" data-hover="dropdown">
Dropdown <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li class="dropdown">
<a href="#">One more dropdown</a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li class="dropdown">
<a href="#">One more dropdown</a>
<ul class="dropdown-menu">
...
</ul>
</li>
<li><a href="#">Something else here</a></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
<li><a href="#">Something else here</a></li>
<li><a href="#">Separated link</a></li>
</ul>
</div>
</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum <a href="">Read More</a>
</div>
</div>
</div>
</div>
</div>
To see a complete example, check out this fiddler link: https://jsfiddle.net/td3ogahk/11/