Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap Split button dropdown size not same

(Sorry, I'm not good at English)

Image of Button's dropdown icon not aligning

I want to make button same size. But It was not same size.

How I can make its size same?

<div class="filter pull-right" style="padding:8px">
<!-- Split button -->
<div class="btn-group">
  <button type="button" class="btn btn-danger">Action</button>
  <button type="button" class="btn btn-danger" data-toggle="dropdown">
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu" role="menu">
    <li><a href="#">Action</a></li>
    <li><a href="#">Another action</a></li>
    <li><a href="#">Something else here</a></li>
    <li class="divider"></li>
    <li><a href="#">Separated link</a></li>
  </ul>
</div>
</div>

`

like image 409
ryush00 Avatar asked Mar 19 '23 15:03

ryush00


1 Answers

The problem is actually not related to the code of the button or a missing space.

What is missing is the HTML tag in the beginning of the document.

Here, you see the button on the left without additional &nbsp; and with additional &nbsp; on the right. The button on the right is somewhat non-symmetric.

no html tag

Following the Boostrap documentation adding this code around your document:

<!DOCTYPE html>
<html lang="en">
  ...
</html>

You will end up with a button like this: with html tag

like image 164
Lukas Avatar answered Mar 29 '23 11:03

Lukas