Home
CSS
CSS Forms
Tryit: Create input fields with bottom border
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> input[type=text] { width: 100%; padding: 12px 20px; margin: 8px 0; box-sizing: border-box; border: none; border-bottom: 2px solid red; } </style> </head> <body> <h2>Input fields with bottom border</h2> <form> <label for="fname">First Name</label> <input type="text" id="fname" name="fname"> <label for="lname">Last Name</label> <input type="text" id="lname" name="lname"> </form> </body> </html>