Below is my code. When I select the input, it has the default black border instead of the color I picked below. I changed :focus
to :hover
, and I do get my desired border when I hover over the input. Any ideas?
input {
width: 250px;
height: 35px;
border-radius: 5px;
margin-top: 5px;
margin-bottom: 18px;
border: 1px solid lightgray;
}
input:focus {
border: 2px solid rgb(255, 145, 0);
}
<input />
2
Answers
The issue might be related to the default styling applied by the browser
The
outline
is hiding your border.When you put it to
outline:none
you have your orange border. 😊