<div class="wrapper"> <div class="form-wrapper"> <h2>FORM LOGIN</h2> <form> <div class="row"> <label>Username</label> <input id="username" name="username" type="text"> </div> <div class="row"> <label>Password</label> <input type="password" id="password" name="password" type="text"> </div> <div class="row"> <input class="btn-login" onclick="Login()" type="submit" value="Login" /> </div> </form> </div> </div>
h2 { color: #f1f1f1; text-align: center; margin-bottom: 15px; } .wrapper { display: flex; justify-content: center; background: #9a2270; font-family: poppins; align-items: center; padding: 20px; height: 100%; box-sizing: border-box; } form { background: #fff9f9; padding: 35px 40px; border-radius: 5px; } .row{ display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; } .row:last-child{ margin-bottom: 0; justify-content: flex-start; } label{ color: #333; width: 90px; font-size: 15px; } #username, #password { padding: 8px 15px; border: 1px solid #1e1e1e; outline: none; width: 250px; min-width: 150px; flex:1; color: #333; } .btn-login { width: 100%; background: #cecece; padding: 10px 20px; margin-top: 3px; border: 1px solid #29323c; color: #333; font-size: 15px; } .btn-login:hover { background: #d9d8d8; }
HTML
CSS
JS