lxer lxer - 2 months ago 8
CSS Question

alignment and 'right-pull'

Somehow the button on the right is not centered (vertically) anymore when

pull-right
is used.
How can it be placed in the middle?

<li >
<a type="button" class="btn btn-default btn-sm ">
<span class="glyphicon glyphicon-minus" ></span>
</a>

<a type="button" class="btn btn-default btn-sm pull-right">
<span class="glyphicon glyphicon-pencil" ></span>
</a>
</li>


https://jsfiddle.net/1mawa84n/2/

Answer

Remove the line-height give padding to li

Try this:

CSS:

 li {
    background: rgba(254, 255, 251, 0.91) none repeat scroll 0 0;
    border: 1px solid black;
    border-radius: 3px;
    display: block;
    /* line-height: 3;*/
    margin: 0 0 -1px;
    padding: 10px;
    max-width: 100%;
    vertical-align: middle;
}