html - Unable to center align the label field of form -


enter image description here

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> 

adding updated css makes centralized, if edit in custom css, it's working!

text-align: left applied control-label therefore overrides "center" applied parent element. try using css below

.control-label, .form-control {     text-align: center; } 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -