Using bootstrap, I'm trying to make a dropdown menu inside one of the buttons in a justified button group. More specifically, I want the dropdown menu list elements to have the same width as the dropdown toggle button. The code below does everything except the width of the dropdown elements is different from the toggle button.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<style>
.pull-right{
margin-top: 7px
}
</style>
</head>
<body>
<div class="container">
<h2>Justified Button Groups</h2>
<div class="btn-group btn-group-justified">
<a href="#" class="btn btn-primary">Apple</a>
<a href="#" class="btn btn-primary">Samsung</a>
<div class="dropdown btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Sony<span class="caret pull-right"></span></button>
<ul class="dropdown-menu">
<li><a href="#" class="btn btn-default btn-block">HTML</a></li>
<li><a href="#" class="btn btn-default btn-block">CSS</a></li>
<li><a href="#" class="btn btn-default btn-block">JavaScript</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>