Is there a way to put text in a textbox but also allow the user to type something. I would like to write “username:” inside the box and allow the user to type after the colon. I can do this the hard way by creating a div right next to a textbox and make it look like they are one container, but I was wondering if there was an easier way? Thanks
EDIT: I don’t want to text to disappear. I just want to user to be able to continue typing
EDIT 2: the reason you cant put a value in the textbox is because its a form. when the user types a username next to the value it will submit together
You could do something like this:
CSS
Basically, created a containing
divand placed alabelandinputin thatdiv.labelis the words that stay in the field.inputhas theborderremoved.http://jsfiddle.net/jasongennaro/rZmFx/
Fyi… you may need to increase the size of the
input, depending on how many characters you want to accept.