html5 - CSS to format SSN form input -


i have form, written in html5 , css3, has specific fields (ssn, phone number, initial) varying lengths. trying figure out how format input field x characters long depending on input (11 ssn, 1 initial, 5 zip... etc)

i know used able put size="11" , input field (not label) set size, seems disabled or being overwritten bs3.

any suggestions on how accomplished?

what have code @ moment is:

                    <div class="form-group">                     <label class="control-label" for="ssn">ssn:</label>                     <input type="email" class="form-control" id="ssn" placeholder="###-##-####" size="12">                 </div> 

but not seem work, , if try class="col-sm-2" (or other number matter) format gets goofy (does not line in cases).

thanks in advance.

since tagged html5 can use:

<div class="form-group">      <label class="control-label" for="ssn">ssn:</label>      <input type="email" class="form-control" id="ssn" placeholder="###-##-####" maxlength="12"> </div> 

by way, class="col-sm-2" bootstrap class defines number of columns element should span. visit http://getbootstrap.com more info.

be sure html doctype is: <!doctype html> more or less means 'use html5'.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -