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

Color of outline on input field

So I have input type="number" elements and when you click in the field, there is a blue glow/border appearing Is it possible to change this to another color?

I am aware I can change the background or arrows and such, but I am unsure if I can change the default blue color when you click in the field.

<div class="b">
    <input class="number" type="number" id="quantity" name="quantity" min="-1" max="100" size="38"> 
</div>

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 :

That’s controlled by the various outline styles. For instance, to make it green, you can use outline-color: green. You can apply this to all input elements, or to just the type="number" ones if you like:

input[type=number] {
    outline-color: green;
}
<div class="b">
    <input class="number" type="number" id="quantity" name="quantity" min="-1" max="100" size="38">
</div>
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