隐藏div标签中包含的下拉列表

时间:2012-10-31 11:38:59

标签: html css twitter-bootstrap

我有这个twitter bootstrap下拉菜单隐藏在父div中,如下所示:

enter image description here

这是我的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

.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;
}

twitter-bootstrap下拉菜单的z-index默认设置为1000我尝试了它的fiddeling但它不想突破父容器。我也试过溢出:可见的风格,但没有成功。如何在盒子外面看到它?

1 个答案:

答案 0 :(得分:0)

您好定义您的position:relative; 到您的 .profile-gallery-image-container

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

live demo

---------

Updated Demo