css - Input control width restricted in asp.net -


i have webforms project in asp.net. i'm using bootstrap 3. have input control in form group (in panel). cannot override max width of input control make fit col width have set. i've tried amend/remove input {max-width} attribute in site.css doesn't make difference. ideas?

                 <div class="row">                         <div class="form-group" >                             <label for="txtname" class="col-md-3 control-label">*material name:</label>                             <div class="col-md-9">                                  <input runat="server" id="txtname" type="text" class="form-control" title="" required  />                             </div>                         </div>                  </div> 

site.css extract changed max-width: 287px :

/* set widths on form inputs since otherwise they're 100% wide */ input, select, textarea {     max-width: 100%; } 

use developer tools on of browser check element of input because you're using runat="server" input id render differently in browser hence styling not applying. i've checked on local dev demo page , input id being rendered maincontent_txtname instead of txtname. of course yours will/might different. once have correct id need is

#maincontent_txtname {   max-width: 100px !important; } 

i hope answers question


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -