How to put glyphicon in bootstrap form? -
i have bootstrap form , want add glyphicon before select fields. however, makes breakline somewhy.
<form role="form" id="registration-form" onsubmit="return onsubmitcontinuebutton()"> <div class="row"> <div class="form-group col-md-6"> <label class="sr-only" for="xxx"></label> <span class="glyphicon glyphicon-name"></span> <!-- <-- there breakline after this.... why?--> <select class="form-control" name="aaa"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> </div> <div class="form-group col-md-6"> <label class="sr-only" for="xxx"></label> <span class="glyphicon glyphicon-name"></span> <!-- <-- there breakline after this.... why?--> <select class="form-control" name="aaa"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> </div> </div> </form>
i want glyphicon near select field , not above it. how can fix it? thanks
if want add icons in front of select field make input group this
<div class="input-group"> <span class="input-group-addon" id="basic-addon1"><span class="glyphicon glyphicon-plus"></span></span> <select class="form-control" name="aaa"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> </div>
for more information right here: bootstrap input groups
Comments
Post a Comment