Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seperate boxes for each letter in an Input field [closed]

I mean these boxes ; I want to imitate a real form but im not sure how to go about this.. I know it's not possible with normal html and might require some javascript/jquery; An example of this form online is also appreciated!

enter image description here

like image 360
bo7ons Avatar asked Jan 15 '14 07:01

bo7ons


People also ask

How do you restrict the input field alphabets?

The HTML <input> tag is used to get user input in HTML. To give a limit to the input field, use the min and max attributes, which is to specify a maximum and minimum value for an input field respectively. To limit the number of characters, use the maxlength attribute.

How do you put a box over a letter in HTML?

First, we create a <style> tag in the <head> section. Then define the CSS classes . CLASS-NAME { STYLES-TO-APPLY } in the <style> tag. Finally, simply attach the CSS classes to the HTML elements – <ELEMENT class="CLASS-NAME"> .

What text box attribute controls how many characters can be entered into the text field?

The MAX attribute can be used to specify an upper limit to the number of characters that can be entered into a text field, e.g. MAX=72 .

How do you make a content box in HTML?

Begin With HTML You will add three boxes with content inside it. You must use the icons from font-awesome. Add the font-awesome CDN to the href tag, so that you can use the icon on your page. Create a <div> tag with class name 'container' and add the details you want to mention in the content box.


1 Answers

I dont think you need any js for this. You only need:

  • An image of a box
  • A monospaced font
  • Some playing around with css values
  • Some Phantasy

See this CSS applied to an input field:

#text{
    background-image: url("square.gif");    
    width: 195px;
    height: 18px;
    background-size: 20px;
    border: none;
    font-family: monospace;
    font-size: 13px;
    padding-left: 5px;
    letter-spacing: 12px;
}

an example here:

http://jsfiddle.net/w564j/

like image 83
Chris Avatar answered Oct 01 '22 20:10

Chris