how to split a textbox into multple subtextboxes for each character

Viewed 1209

I am designing a PHP form that contains some input fields as displayed in below image.

Input Fields

How can I split an input type(textbox) into single character sub-textboxes OR a textbox into multi-column textboxes for each character separately for given string.

And how to insert the data in it e.g. |JOHN DOE| into |J|O|H|N| |D|O|E| this manner

1 Answers

You may visit this URL http://jsfiddle.net/w564j/ for sample

HTML

<input type="text" maxlength="9" id="text"/>

CSS

#text{
    background-image: url("http://3.bp.blogspot.com/-4oAWWCcNNz4/Tjr3nKNyVUI/AAAAAAAAPLU/Pouua-pNsEY/s1600/sq.gif");    
    width: 195px;
    height: 18px;
    background-size: 20px;
    border: none;
    font-family: monospace;
    font-size: 13px;
    padding-left: 5px;
    letter-spacing: 12px;
}
Related