* { margin: 0; padding: 0; } body { display: flex; justify-content: center; align-items: center; flex-direction: column; min-height: 100vh; gap: 19px; background-color: rgb(255, 255, 255); } h1 { font-size: 36px; margin-bottom: 10px; } .inputfield { position: relative; } .inputfield input { width: 275px; padding: 10px 20px 10px 20px; border: 1px solid rgb(207, 207, 207); outline: none; font-size: 1.25em; border-radius: 6px; line-height: 35px; } .inputfield span { position: absolute; top: 50%; transform: translateY(-50%); left: 0; padding: 10px; pointer-events: none; font-size: 1.25em; color: blue; transition: 0.35s; margin-left: 10px; border-radius: 6px; color: rgb(170, 170, 170); } .inputfield input:valid ~ span, .inputfield input:focus ~ span{ top: 0; color:rgb(76, 194, 95); transform: translateY(-10px); font-size: 1.19em; padding: 0px 10px; background: rgb(255, 255, 255); } .inputfield input:focus { border-color: rgb(76, 194, 95); } #continue { background-color: rgb(46, 224, 46); border: none; border-radius: 6px; color: white; width: 315px; height: 50px; font-size: 1.25em; margin-bottom: 20px; transition: 0.2s; } #continue:hover { cursor: pointer; background-color: rgb(46, 200, 46); } p { text-align: center; font-size: 17px; } a { color: green; text-decoration: none; } form { display: flex; flex-direction: column; align-items: center; gap: 19px; }