Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to get rid of the black line on the border of the inputs and textarea

I have been struggling to get rid of this line when I click on a specific input. Here is an example:

enter image description here

form input {
  width: 98 % ;
  margin: 5 px;
  border: 2 px solid white;
  padding: 10 px;
  /* background-color: #000; */
  background - color: transparent;
  font - weight: 600;
  color: white;
  font - family: 'Poppins',
  sans - serif;
}

form input: focus {
  border: none;
}

textarea {
  min - height: 100 px;
  background - color: transparent;
  color: white;
  font - family: 'Poppins', sans - serif;
  width: 98 % ;
  margin: 5 px;
  border: 2 px solid white;
  resize: none;
  font - weight: 600;
  padding: 10 px;
}
<form class="form appear appear-hidden" method="post">
  <h1>Contact Me</h1>
  <div class="name-section">
    <input name="name" type="name" placeholder="Name" required />
    <input name="name" type="surname" placeholder="Surname" required />
  </div>
  <input name="email" type="email" placeholder="Email" required />

  <textarea name="message" type="message" placeholder="Message" row="4" required></textarea>

  <input class="submit" type="submit" placeholder="submit" />
</form>

I’m just looking for a solution that will help me to get rid of the black border when the input is focused on. This Black border doesn’t appear when an input is not focused on.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Thanks in advance for the help.

>Solution :

form input {
  width: 98%;
  margin: 5px;
  border: 2px solid white;
  padding: 10px;
  /* background-color: #000; */
  background-color: transparent;
  font-weight: 600;
  color: white;
  font-family: 'Poppins', sans-serif;
}

form input:focus {
  border: none;
  outline: none;
}

textarea {
  min-height: 100px;
  background-color: transparent;
  color: white;
  font-family: 'Poppins', sans-serif;
  width: 98%;
  margin: 5px;
  border: 2px solid white;
  resize: none;
  font-weight: 600;
  padding: 10px;
  outline: none;
}
<form class="form appear appear-hidden" method="post">
  <h1>Contact Me</h1>
  <div class="name-section">
    <input name="name" type="name" placeholder="Name" required />
    <input name="name" type="surname" placeholder="Surname" required />
  </div>
  <input name="email" type="email" placeholder="Email" required />

  <textarea name="message" type="message" placeholder="Message" row="4" required></textarea>

  <input class="submit" type="submit" placeholder="submit" />
</form>
  • It is outline.
    Just use outline:none.

form input:focus {
  border: none;
outline:none;
 }

textarea {
outline:none;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading