html - Search bar with glyphicon inside (no borders) -
i using bootstrap 3, can't icon / button on right side without annoying borders. make me demo, similar?
html:
<div class="input-group"> <input type="search" name="søk på siden" placeholder="søk etter midtveisvurdering, iko modellen eller hva du måtte ønske!" id="input" class="form-control" value="" required="required" title="søk på siden"> <span class="input-group-addon"> <button type="button" class="btn btn-search"> <span class="glyphicon glyphicon-search" aria-hidden="true"></span> </button> </span> </div>
css:
.form-control { display: block; width: 100%; height: 50px; padding: 6px 12px; font-size: 16px; line-height: 1.42857; color: #555555; background-color: $lightgray; background-image: none; border-bottom: 3px solid $whiteblue; border-radius: 0; } .btn-search { color: $silver; background-color: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.15); } .input-group-addon { padding: 6px 12px; font-size: 14px; font-weight: normal; line-height: 1; color: #555; text-align: center; background-color: #fafbfd; border: 0; border-right: 1px solid #ccc; border-top: 1px solid #ccc; border-left: 1px solid #fafbfd; border-bottom: 3px solid $whiteblue; border-radius: 0; }
this because use button. try output :
<div class="input-group"> <input type="search" name="søk på siden" placeholder="søk etter midtveisvurdering, iko modellen eller hva du måtte ønske!" id="input" class="form-control" value="" required="required" title="søk på siden"> <span class="input-group-addon"> <span class="glyphicon glyphicon-search" aria-hidden="true"></span> </span> </div>
you'll possibly have add
.glyphicon-search{ float: right; }
or similar.
Comments
Post a Comment