我找不到解决问题的方法。 我的.dropdown菜单隐藏在我的.media div后面。 我尝试了从position:relative / absolute到z-index的所有内容,但是我无法在这两种情况下工作。 也许你可以帮助我。 非常感谢你!
<div class="btn-group " >
<button type="text" class="btn " style="background-color: #22CAFF">Sortieren nach</button>
<button type="button" class="btn dropdown-toggle" style="background-color: #22CAFF" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu " style="position: fixed; z-index: 10000;">
<?php echo get_options(); ?>
</ul>
</div>
<div class='media' id='Erg_Praxis' style='overflow:visible;'>
<div class='media-left media-middle'>
<a href='SuchePraxis.php?id=$Id'>
<img class='media-object' src='../upload/$Bild' alt='Bild $Praxisname'> </a>
</div>
<div class='media-body'>
<h4 class='media-heading'> </h4>
</div>
</div>
答案 0 :(得分:1)
由于您的下拉列表无法使用提供的代码,因此我添加了通用代码并对您进行了评论,因为您可以看到图片上方的下拉列表:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Dropdown
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</div>
<!-- <div class="btn-group">
<button type="text" class="btn" style="background-color: #22CAFF">Sortieren nach</button>
<button type="button" class="btn dropdown-toggle" style="background-color: #22CAFF;" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" style="position: fixed; z-index: 10000;">
<?php echo get_options(); ?>
</ul>
</div> -->
<div class='media' id='Erg_Praxis' style='overflow:visible;'>
<div class='media-left media-middle'>
<a href='SuchePraxis.php?id=$Id'>
<img class='media-object' src='../upload/$Bild' alt='Bild $Praxisname'></a>
</div>
<div class='media-body'>
<h4 class='media-heading'> </h4>
</div>
</div>