Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <style> .minimalist-form-container { max-width: 500px; margin: 40px auto; padding: 30px; font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #fff; } @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap'); .minimalist-form h2 { text-align: center; font-weight: 500; margin-bottom: 30px; } .form-group { margin-bottom: 25px; position: relative; } /* For this style, we'll often put the label below the input or use floating labels. */ /* For simplicity and accessibility, we'll keep them above for now. */ .form-group label { display: block; font-size: 0.9rem; color: #666; margin-bottom: 8px; } /* -- The core input style -- */ .form-group input, .form-group textarea { width: 100%; border: none; border-bottom: 1px solid #ccc; /* Underline only */ background: transparent; padding: 10px 0; /* Add padding to the bottom */ font-size: 1.1rem; color: #333; transition: border-color 0.2s; } .form-group textarea { height: 80px; resize: none; } .form-group input:focus, .form-group textarea:focus { outline: none; border-bottom: 2px solid #333; /* Thicker underline on focus */ } /* -- End core style -- */ .submit-btn { display: block; width: 100%; margin-top: 30px; padding: 15px; border: 1px solid #333; background: #333; color: white; font-size: 1rem; font-weight: 500; cursor: pointer; transition: background-color 0.2s, color 0.2s; } .submit-btn:hover { background: #fff; color: #333; } </style> <div class="minimalist-form-container"> <form class="minimalist-form" action="#" method="post"> <h2>Let's talk</h2> <div class="form-group"> <label for="min-name">Your Name</label> <input type="text" id="min-name" name="name" required> </div> <div class="form-group"> <label for="min-email">Your Email</label> <input type="email" id="min-email" name="email" required> </div> <div class="form-group"> <label for="min-message">Your Message</label> <textarea id="min-message" name="message" required></textarea> </div> <button type="submit" class="submit-btn">Send</button> </form> </div>