Dia Dia - 1 year ago 70
CSS Question

How Can I change the hover color of a button in Bootstrap 3?

I am new in CSS Bootstrap. Please help me to change the hover color of the button "Go"

<form class="navbar-form navbar-left" role="search">
<div class="input-group">
<span class="input-group-btn">
<button type="submit" class="btn btn-info">Go</button>
</span>
<label for="search" class="sr-only">Search</label>
<input type="text" id="search" class= "form-control" placeholder="Search" >
<span class="glyphicon glyphicon-search form-control-feedback"></span>
</div>
</form>

Answer Source

Don’t use “!important”

Read More : https://j11y.io/css/dont-use-important/

Note : I added ID attribute.

#col:hover {

   background-color: red;

}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<form class="navbar-form navbar-left" role="search">
        <div class="input-group">
            <span class="input-group-btn">
             <button type="submit" id="col" class="btn btn-info">Go</button>
            </span>
            <label for="search" class="sr-only">Search</label>
            <input type="text" id="search" class= "form-control" placeholder="Search" >
            <span class="glyphicon glyphicon-search form-control-feedback"></span>
        </div>
</form>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download