I am trying to add a dropdown setting menu to my comments section in a project that I've been working on.
The dropdown menu seems to cut itself off and I am not sure why is that the case.
I tried overflow:visible and z-index:999
. but none of them seem to work.
This is a basic comment block that I am trying to include a dropdown in
This is the basic code that I am trying to Implement
<div class="media">
<a class="pull-left" href="/user/{{shared_scribble.scribble.user.username}}/"><img class="media-object" src="/img.png/"></a>
<div class="dropdown pull-right">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#" style="font-size:10px;padding: 4px 8px;">
<b data-icon=""></b> <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="#"><i class="icon-pencil"></i> Edit</a></li>
<li><a href="#"><i class="icon-trash"></i> Delete</a></li>
<li><a href="#"><i class="icon-ban-circle"></i> Ban</a></li>
<li class="divider"></li>
<li><a href="#"><i class="i"></i> Make admin</a></li>
</ul>
</div>
<div class="media-body">
<h4 class="media-heading"><a class="username" href="/user/hi/">Test User</h4>
<p>
Main body of the comment
</p>
</div>
</div>
And this is how my dropdown menu is turning out to be
media CSS
.media,
.media-body {
overflow: hidden;
*overflow: visible;
zoom: 1;
}
.media,
.media .media {
margin-top: 15px;
}
.media:first-child {
margin-top: 0;
}
.media-object {
display: block;
}
.media-heading {
margin: 0 0 5px;
}
.media .pull-left {
margin-right: 10px;
}
.media .pull-right {
margin-left: 10px;
}
.media-list {
margin-left: 0;
list-style: none;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…