Vishal Panara Vishal Panara - 4 months ago 7
CSS Question

I want to make Drop left rather then drop down

I want to make Drop left rather then drop down in bootstrap drop down button. I'm trying to make this happen but i can't able to do this, Can anyone guide me to do this?

Here is my code



<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="col-sm-4 col-sm-offset-4">
<div class="btn-group">
<button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Small button <span class="caret"></span>
</button>
<ul class="dropdown-menu ">
<button class="btn btn-primary">Action 1</button>
<button class="btn btn-danger">Action 2</button>
</ul>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

<script type="text/javascript">
$(function () {
$('[data-toggle="popover"]').popover()
})
</script>




Answer

This part of the css where there is top and left:

.dropdown-menu {
  top: -10px !important;
  left: -160% !important;
}