html - Why bootstrap grid system is not following the column sizes -
that's how want phone , extension align in form
that's wrote phone , extension row
:
<div class="row form-group"> <label class="control-label col-md-2" for="phone">phone</label> <div class="col-md-6"> <input class="col-md-5" id="adminphone" name="adminphone" type="text" value="" placeholder="(999) 999-9999"> <div class="form-group col-md-7 pull-right"> <label class="control-label col-md-1" style="text-align: right" for="adminext">ext</label> <input class="col-md-6 pull-right" id="adminext" name="adminext" type="text" value="" placeholder="1234"> </div> </div> </div>
and that's how start
or this:
i don't know how else should have structured work right?
also example email section above works fine this:
<div class="row form-group"> <label class="control-label col-md-2" for="email">email</label> <div class="col-md-6"> <input id="adminemail" name="adminemail" type="text" value="" style="width: 100%" placeholder="email"> <span class="glyphicon glyphicon-envelope form-control-feedback" style="right: 10px; line-height: 27px; color: lightblue"></span> </div> <div class="col-md-4"> <div> <input class="checkbox-inline" id="showadminphone" name="showadminphone" type="checkbox" value="true"><input name="showadminphone" type="hidden" value="false"> <label class="control-label" for="show_admin_phone">show admin phone</label> </div> </div> </div>
because using only col-md-*
medium devices, have use col-sm-*
(for small devices), or col-xs-*
(for small devices)
however, advise take @ forms bootstrap docs because form complicated, , there no need use .col-
@ all.
take @ basic demo docs:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <form> <div class="form-group"> <label for="exampleinputemail1">email address</label> <input type="email" class="form-control" id="exampleinputemail1" placeholder="email"> </div> <div class="form-group"> <label for="exampleinputpassword1">password</label> <input type="password" class="form-control" id="exampleinputpassword1" placeholder="password"> </div> <div class="form-group"> <label for="exampleinputfile">file input</label> <input type="file" id="exampleinputfile"> <p class="help-block">example block-level text here.</p> </div> <div class="checkbox"> <label> <input type="checkbox"> check me out </label> </div> <button type="submit" class="btn btn-default">submit</button> </form>
Comments
Post a Comment