How Can I Make Form Elements White?

Hello I shared my codes on code snippet. I want to make form elements (enter your name, date of birth, gender sections white) I tried to find a solution and even used important tag but it did not work. Any help appricated. Thanks already.Also I wanna add icons next to first name last name phone number etc.

*{
    margin: 0;
    border: 0;
    box-sizing: border-box;
background: #CDE7ED;
}
.heading1{
    position: absolute;
width: 449px;
height: 80px;
top: 56px;

font-family: 'Montserrat';
font-style: normal;
font-weight: 500;
font-size: 30px;
line-height: 40px;
/* or 133% */

text-align: center;

background: #FFFFFF;
color: #0B2B5B;
}

#navbar{
position: relative;
height: 196px;

top: 0px;
display: flex;
justify-content: center;

background: #FFFFFF;
}

.iki{
  
height: 32px;
left: 539px;
top: 230px;

font-family: 'Montserrat';
font-style: normal;
font-weight: 500;
font-size: 24px;
line-height: 32px;


text-align: center;

color: #0B2B5B;
}
.uc{

height: 32px;
left: 435px;
top: 270px;

font-family: 'Montserrat';
font-style: normal;
font-weight: 500;
font-size: 20px;
line-height: 32px;
/* identical to box height, or 160% */

text-align: center;

color: #0B2B5B;
}

.box{
  
    margin: auto;
    
    width: 782px;
    height: 380px;
    left: 470px;
    
    top: 334px;
    
    background: #FFFFFF;
    box-shadow: 0px 2px 4px rgba(11, 43, 91, 0.1);
    border-radius: 4px;
}

.box-header{
   
width: 782px;
height: 64px;
left: 249px;
top: 334px;

background: #FFFFFF;
border-radius: 4px 4px 0px 0px;
display: flex;
}
.b1{
    
width: 40px;
height: 64px;
left: 249px;
top: 334px;

background: #25A575;
border-radius: 4px 0px 0px 0px;

}
.b11{
   
width: 10px;
height: 32px;
left: 264px;
top: 350px;

font-family: 'Montserrat';
font-style: normal;
font-weight: 500;
font-size: 26px;
line-height: 32px;


display: flex;
align-items: center;
text-align: center;
font-feature-settings: 'pnum' on, 'lnum' on;

color: #FFFFFF;
background: #25A575;
}
.new{
  position: sticky;  

left: 305px;
top: 354px;
padding-left: 10px;

font-family: 'Montserrat';
font-style: normal;
font-weight: 500;
font-size: 20px;
line-height: 24px;
/* identical to box height, or 120% */

display: flex;
align-items: center;
font-feature-settings: 'pnum' on, 'lnum' on;

color: #3A719B;
background-color: white;
}

.box-body{   
    width: 295px;
    height: 16px;
    left: 24px;
    top: 0px;  
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 16px;
    /* identical to box height, or 100% */
    
    display: flex;
    align-items: center;
    
    color: #3A719B;
}  
  .containerr{
    
    width: 100%;
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 5px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
  }
  .containerr .title{
    font-size: 25px;
    font-weight: 500;
    position: relative;
  }
  .containerr .title::before{
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 30px;
    border-radius: 5px;
    background: linear-gradient(135deg, #71b7e6, #9b59b6);
  }
  .content form .user-details{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 20px 0 12px 0;
  }
  form .user-details .input-box{
    margin-bottom: 15px;
    width: calc(100% / 2 - 20px);
  }
  form .input-box span.details{
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
  }
  .user-details .input-box input{
    height: 45px;
    width: 100%;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    padding-left: 15px;
    border: 1px solid #ccc;
    border-bottom-width: 2px;
    transition: all 0.3s ease;
  }
  .user-details .input-box input:focus,
  .user-details .input-box input:valid{
    border-color: #9b59b6;
  }
   form .gender-details .gender-title{
    font-size: 20px;
    font-weight: 500;
   }
   form .category{
     display: flex;
     width: 80%;
     margin: 14px 0 ;
     justify-content: space-between;
   }
   form .category label{
     display: flex;
     align-items: center;
     cursor: pointer;
   }
   form .category label .dot{
    height: 18px;
    width: 18px;
    border-radius: 50%;
    margin-right: 10px;
    background: #d9d9d9;
    border: 5px solid transparent;
    transition: all 0.3s ease;
  }
   #dot-1:checked ~ .category label .one,
   #dot-2:checked ~ .category label .two,
   #dot-3:checked ~ .category label .three{
     background: #9b59b6;
     border-color: #d9d9d9;
   }
   form input[type="radio"]{
     display: none;
   }
   form .button{
     height: 45px;
     margin: 35px 0
   }
   form .button input{
     height: 100%;
     width: 100%;
     border-radius: 5px;
     border: none;
     color: #fff;
     font-size: 18px;
     font-weight: 500;
     letter-spacing: 1px;
     cursor: pointer;
     transition: all 0.3s ease;
     background: linear-gradient(135deg, #71b7e6, #9b59b6);
   }
   form .button input:hover{
    /* transform: scale(0.99); */
    background: linear-gradient(-135deg, #71b7e6, #9b59b6);
    }
   @media(max-width: 584px){
   .containerr{
    max-width: 100%;
  }
  form .user-details .input-box{
      margin-bottom: 15px;
      width: 100%;
    }
    form .category{
      width: 100%;
    }
    .content form .user-details{
      max-height: 300px;
      overflow-y: scroll;
    }
    .user-details::-webkit-scrollbar{
      width: 5px;
    }
    }
    @media(max-width: 459px){
    .containerr .content .category{
      flex-direction: column;
    }
  }
  .content{
    background-color: #FFFFFF ;
    background: white; 
  }
  .user-details{
    background-color: #FFFFFF;
  }
  .input-box{
    background-color: #FFFFFF;
  }
  .details{
    background-color: #FFFFFF;
  }
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700;800&family=Oswald:wght@200;300;400&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://kit.fontawesome.com/0b27183842.css" crossorigin="anonymous">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
    <script src="https://kit.fontawesome.com/779e57ef2a.js" crossorigin="anonymous"></script>
    <title>Document</title>
</head>
<body>
    <script src="app.js"></script>

    <header class="header">
        <div class="container">
            <nav id="navbar">
                <h1 class="heading1">Patient Referral Form Hayes Valley Health San Francisco </h1>              
            </nav>
        </div>
    </header>
    <br>
    <br>
    <br>
    <h2 class="iki">Referral Patients</h2>
    <h3 class="uc">You can add up to five patients at a time</h3>
    <div class="box">
        <div class="box-header">
            <div class="b1">
                <div class="b11">
                    1
                </div>
            </div>
            <div class="new">
                New Referral 
            </div>
        </div>
        <div class="containerr">
            <div class="content">
              <form action="#">
                <div class="user-details">
                  <div class="input-box">
                    <span class="details">First Name</span>
                    <input type="text" placeholder="Enter your name" required>
                  </div>
                  <div class="input-box">
                    <span class="details">Last Name</span>
                    <input type="text" placeholder="Enter your last name" required>
                  </div>
                  <div class="input-box">
                    <span class="details">Email</span>
                    <input type="text" placeholder="Enter your email" required>
                  </div>
                  <div class="input-box">
                    <span class="details">Phone Number</span>
                    <input type="text" placeholder="Enter your number" required>
                  </div>
                  <div class="input-box">
                    <fieldset>   
                        <div class="fieldmoveindate">
                          <label for="MoveInDate">Date of Birth</label>
                          <input autocomplete="off"  id="MoveInDate" name="MoveInDate" placeholder="Enter your birthday" type="date" min="1950-12-17" max="2016-01-01" spellcheck="false" value="2016-12-17" required>
                        </div>
                      </fieldset>
                  </div>
                  <div class="input-box">
                    <span class="details">Contact Language</span>
                    <input type="text" placeholder="Enter your contact language" required>
                  </div>
                </div>
                <div class="gender-details">
                  <input type="radio" name="gender" id="dot-1">
                  <input type="radio" name="gender" id="dot-2">
                  <input type="radio" name="gender" id="dot-3">
                  <span class="gender-title">Gender</span>
                  <div class="category">
                    <label for="dot-1">
                    <span class="dot one"></span>
                    <span class="gender">Male</span>
                  </label>
                  <label for="dot-2">
                    <span class="dot two"></span>
                    <span class="gender">Female</span>
                  </label>
                  <label for="dot-3">
                    <span class="dot three"></span>
                    <span class="gender">Prefer not to say</span>
                    </label>
                  </div>
                </div>
                <div class="button">
                  <input type="submit" value="Register">
                </div>
              </form>
            </div>
          </div>     
    </div>
</body>
</html>

>Solution :

If you mean the background color of form elements, you can add this CSS rule:

.user-details .input-box input {
  background: #fff;
}

If you mean the color of text, add this CSS:

.user-details .input-box input::placeholder {
  color: #fff;
}

.user-details .input-box input::-ms-input-placeholder {
  color: #fff;
}

Leave a Reply