Question: I'm creating a toggle button to which I want to bind a select event. I've created the button, but I have no clue of how to bind the values to it and make it work like a select button. Can someone give me some clue or some examples related to it, so that I can try that out and learn some thing?

My requirement is I've to bind the select event to it and make it work like a select button.

This is how I've created the button:

```
<div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-6">Tax Value</label>
                    <div class="col-sm-6">
                        <div class="input-group">
                            <div class="input-group-btn">
                                <button type="button" class="btn btn-default dropdown-toggle align-right" id="tax_toggle" name="tax_toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Tax <span class="caret"></span></button>
                            </div>
                            <input type="text" id="invoice_request_tax_value" name="invoice_request_tax_value" class="form-control" placeholder="Tax Value" required="required" readonly="readonly">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-12" id="invoice_request_tax_value_label">Tax Value - Nil</label>
                </div>
            </div>
        </div>

```

Answer: 
Here are few things 

Incorrect html structure  

```
<li><a href="#">Foods</li></a>

```

change it to 

```
<li><a href="#">Foods</a></li>

```

show us the style for li, a and .divider
which one is using background: #809109;

I guess you need to remove padding of li

```
.dropdown-menu > li{
    padding:0px
}

```

or you can add background-color for li too

```
.dropdown-menu > li{
    background-color:#809109;
}

```
Though the problem statement is incomplete and the html syntax is faulty, still this problem can occur without those. The problem lies in inserting the divider or horizontal rule, whatever separator you are using. For these, the Unordered List tag adds additional padding which might be the case in this problem. You can use one of the methods mentioned in this answer to solve your problem:

[Remove padding from unordered list](https://stackoverflow.com/questions/20616334/remove-padding-from-unordered-list)