Change the underscore to input area in HTML
<P class="p3"><FONT class="ft4">Full Names as in Passport /NRIC_____________________________________________________________________</FONT></P>
As you can see, this is part of an HTML form. I want the long underscore to change to a text input area with the same length and as user types I want to display the words above. Please kindly help me, thanks. I have tried and ha开发者_开发百科vent gotten very far.
input.user_input {
border: none;
border-bottom: 1px solid black;
}
input.user_input:focus {
box-shadow: 0 4px 2px -2px #666;
outline-width: 0;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>My form</title>
</head>
<body>
<form action="form_action.php" method="get">
<fieldset>
<legend>My form</legend>
<label>First name</label>
<input type="text" name="fname" class="user_input" />
<input type="submit" value="Submit" />
</fieldset>
</form>
</body>
</html>
Try
<input type="text" style="border: none; border-bottom: 1px solid black;">
精彩评论