Reputation: 1458
Is there any way to remove the red border from a required input or textarea in Firefox? this is what i have tried:
HTML
<textarea class="opt" rows="3"placeholder="opt" required></textarea>
CSS
.opt:required:focus
{
border: 1px solid black;
outline:none;
}
Upvotes: 2
Views: 775
Reputation: 12933
It's not a border
, it's a box-shadow
and you can target :invalid
:
.opt:invalid {
box-shadow:none;
}
You can also add:
border: 1px solid black; //or whatever color/style you want
To overwrite the focus highlight as well:
Upvotes: 6