score:1

Accepted answer
return (
  <div className="container">
        <div className="login">
          <img src={pacifyr} alt="logo"/>
          <div className="position-relative">
            <img className="position-absolute" src={Envelope} alt="username"/>
            <input placeholder='username' />
          </div>
          <div className="position-relative">
            <img className="position-absolute" src={Lock} alt="username"/>
            <input placeholder='password' />
          </div>
        </div>
  </div>
)
<style>
.position-relative{
  position: relative;
}

.position-relative input{
  padding: 10px 10px 10px 30px;
}

.position-absolute{
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
}
</style>

score:0

<div class="row">
  <div class="icon">
    <img src="https://www.iconninja.com/files/618/860/906/internet-google-message-gmail-computer-email-icon.svg" alt="">
  </div>
  <input type="text" placeholder="Email/Username">
</div>
<div class="row">
  <div class="icon">
    <img src="https://www.iconninja.com/files/618/860/906/internet-google-message-gmail-computer-email-icon.svg" alt="">
  </div>
  <input type="text" placeholder="Password">
</div>

score:0

.login {
    width: 300px;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.row {
    margin: 10px;
    display: flex;
    flex-direction: row;
    height: 30px;
    justify-content: center;
}

.icon {
    width: 50px;
}

.field {
    flex: 1;
}

Related Query

More Query from same tag