简体   繁体   English

包含在div标签中的下拉菜单已隐藏

[英]dropdown contained within div tag hidden

I have this twitter bootstrap dropdown menu that is hidden inside a parent div like this: 我有一个这样的twitter bootstrap下拉菜单,它隐藏在父div中,如下所示:

在此处输入图片说明

Here is my css and html: 这是我的CSS和HTML:

<div class="profile-gallery-image-container">
    <img src="#" />
      <div class="image-options">
        <div class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#"><b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="#">test</a></li>
           </ul>
        </div>
    </div>
</div>

Css 的CSS

.profile-gallery-image-container {
    max-width: 105px;
    max-height: 80px;
    margin-bottom: 0px;
    display: inline-block;
    border: 2px solid rgba(140,140,140,1);
    overflow: visible;
}

    .image-options { 
    float: right;
    display: inline;
    position: absolute;
    border: 2px solid rgba(255,128,64,1);
    width: 10px;
    height: 10px;
    top: 0px;
    right: 0px;
}

The z-index of the twitter-bootstrap dropdown menu is set to 1000 by default i tried fiddeling with it but it does not want to break out of the parent container. 默认情况下,twitter-bootstrap下拉菜单的z-index设置为1000,我尝试使用它进行配对,但它不希望脱离父容器。 I also tried overflow: visible style but without success. 我也尝试过溢出:可见的样式,但是没有成功。 How should I make it visible outside the box? 我应该如何在盒子外面看到它?

Hi now define your position:relative; 您好,现在定义您的position:relative; to your .profile-gallery-image-container class 到您的 .profile-gallery-image-container

.profile-gallery-image-container {
position:relative;}

live demo 现场演示

--------- ---------

Updated Demo 更新的演示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM