i need some help for my web programming assignment; i have to create a form input like shown below using ONLY html and css (so no js).
no, i'm not allowed to use an input field for each square
i need some help for my web programming assignment; i have to create a form input like shown below using ONLY html and css (so no js).
no, i'm not allowed to use an input field for each square
One possible solution is to use a repeating background image, either a vertical line or in the example below, an SVG:
input {
width: 198px;
font-family: monospace;
letter-spacing: 8px;
border: 1px solid #000;
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><line style="stroke: #000" x1="20.090665817260742" y1="-0.08398216962814331" x2="20.090665817260742" y2="20.07965660095215"/></svg>');
background-repeat: repeat-x;
}
Note: I suspect your teacher will consider this "cheating", especially since you've not written any actual CSS yourself. However, this is one possible real-world solution I might use for this.