twitter bootstrap - href link and dropdown btn-group div are not aligned properly -
the editing link , button group not aligned properly. button group below when matched editing link button. want them both aligned. want without using css.
here code:
<div class="btn-group" role="group" aria-label="..."> <a href="/cs/roger/index.php?type=editing" class="btn btn-warning">editing</a> <div class="btn-group" role="group"> <button type="button" class="btn btn-default dropdown-toggle glyphicon glyphicon-list" data-toggle="dropdown" aria-expanded="false"> <span class="caret"></span> </button> <ul class="dropdown-menu dropdown-menu-right" role="menu"> <li><a href="/cs/roger/index.php?type=open" >open</a></li> <li><a href="/cs/roger/index.php?type=approved" >approved</a></li> </ul> </div> </div>
here fiddle: jsfiddle help.
just add glyphicon other span
inside button
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/> <div class="btn-group" role="group" aria-label="..."> <a href="/cs/roger/index.php?type=editing" class="btn btn-warning">editing</a> <div class="btn-group" role="group"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="project status"> <span class="glyphicon glyphicon-list "></span> <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="/cs/roger/index.php?type=open" >open</a></li> <li><a href="/cs/roger/index.php?type=approved" title="lists approved projects">approved</a></li> </ul> </div> </div>
in example adding glyphicon classes button
itself.
<button type="button" class="btn btn-default dropdown-toggle glyphicon glyphicon-list" data-toggle="dropdown" aria-expanded="false" title="project status"> <span class="caret"></span> </button>
which lead wrong formatting. give glyphicon it's own span
inside button
.
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="project status"> <span class="glyphicon glyphicon-list "></span> <span class="caret"></span> </button>
Comments
Post a Comment