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

Why top and left part of input element appear darker than other sides?

I am applying this simple css on an input element for it to have a uniform, thin border which is lightgray in color, on ALL sides. However, I find that two of the sides appear darker ? or it is a shadow property of some kind ? What can be done to make it uniform on all sides ?

input {
  border-width: thin;
  border-color: lightgray;
  box-shadow: none;
  outline: none;
}
<input>

enter image description here

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 :

The default value for border-style on input elements is usually inset. You need to set it to solid.

Actually it usually makes sense to use the border shorthand and always set width, color and style at the same time:

border: lightgray thin solid;
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