How can I change text box border color when hovered?

  • Profile Image
    Asked on January 28, 2021 at 07:22 PM

    When a text box is hovered over, what's the CSS code to change the color of the border?

  • Profile Image
    Answered on January 29, 2021 at 01:24 AM

    Hi there,

    You can inject the following CSS in your form:

    input:focus, input:hover, 
    textarea:focus, textarea:hover,
    select:focus, select:hover {
        outline: none !important;
        border: none !important;
        box-shadow: 0 0 20px 5px black !important;

    The hover effect will be added to the box shadow of the fields. You can check this in the cloned form below.

    Here is how you can clone it.

    Let us know if you need further assistance.


  • Profile Image
    Answered on February 03, 2021 at 02:30 PM

    thank you