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

Input style problem in html really unusual

I have a question. Why does the style on the input (border-color) make me make this dark green line? it should be all light green!

.contact .contact-content input[type=text]{
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border-color: rgb(0, 255, 72);
border-radius: 5px;
border-width: 3px;
font-family: 'Poppins', sans-serif;
}

picture of the problem

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

>Solution :

It was because you haven’t added the border style to the input. The border style for elements is set inset by default. Take a look at mdn.

input[type=text]{
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border-radius: 5px;
/* border-color: rgb(0, 255, 72);
border-width: 3px;
border-style: solid; */
/* Use shorthand method */
border: 3px solid rgb(0, 255, 72);
font-family: 'Poppins', sans-serif;
}
<input type="text" />
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