html - Put text in textbox -
html - Put text in textbox -
is there way set text in textbox allow user type something. write "username:" within box , allow user type after colon. can hard way creating div right next textbox , create 1 container, wondering if there easier way? thanks
edit: don't want text disappear. want user able go on typing
edit 2: reason cant set value in textbox because form. when user types username next value submit together
you this:
<div> <label>username:</label> <input type="text" /> </div>
css
div{border:1px solid gray;} label{font-family:arial; font-size:.8em;} input{border:none;} input:focus{outline:none;}
basically, created containing div
, placed label
, input
in div
. label
words remain in field. input
has border
removed.
http://jsfiddle.net/jasongennaro/rzmfx/
fyi... may need increment size of input
, depending on how many characters want accept.
html css textbox
Comments
Post a Comment