.input { padding-right: 50px; } .button { position: absolute; right: 0; top: 0; margin: 7px; padding: 6px; border: 0; color: #8c889b; transition: color 0.3s ease; } .button:hover { color: #ffffff; transition: color 0.3s ease; } .wrapper { position: relative; }