<div class="input-field"> <input required="" name="text" type="text" /> <label>Enter your email</label> </div>
.input-field { position: relative; border-bottom: 2px solid #f0f424; margin: 15px 0; } .input-field label { position: absolute; top: 50%; left: 0; transform: translateY(-50%); color: #fff;