1

I would like to insert a character into the input field before the user has started typing in it, and the user cannot delete this character.

So then when the user types'100' into the field, the resulting string would be 'B100'. The 'B' should be visible.

Any ideas how to do this without javascript? Thanks

zigg76
  • 55
  • 1
  • 7

1 Answers1

1

The padding needs some work but perhaps this

the dupes are better though

span {
  border-top: 1px solid red;
  border-left: 1px solid red;
  border-bottom: 1px solid red;
  padding:1px;
}

input {
  border-left:0;
  border-top: 1px solid red;
  border-right: 1px solid red;
  border-bottom: 1px solid red;
  height:19px;
}
<span>B</span><input type="text" />
mplungjan
  • 169,008
  • 28
  • 173
  • 236