html - Unable to center align the label field of form -
i want center align form w.r.t. page, if use following, text input field getting aligned label remains @ left. how resolve it?
<div id="passcode"></div> <form class="form-horizontal"> <fieldset> <legend style="color:#145fac">please fill in online form</legend> <div class="form-group"> <label for="inputemail" class="col-lg-2 control-label">name</label> <div class="col-lg-10"> <input type="text" class="form-control formwidth" id="inputname" placeholder="nam" /> </div>...</div> </fieldset> </form>
text-align: left
applied control-label
therefore overrides "center" applied parent element. try using css below
.control-label, .form-control { text-align: center; }
Comments
Post a Comment