Added icon to the input field. It works fine while on focus i am trying to change the border color to be changed it works but the focus is not working for the icon. I am adding the codes here.
HTML, CSS
.wpcf7-form label i {
position: absolute;
display: block;
z-index: 999;
width: 45px;
line-height: 45px;
height: 45px;
border-right: 1px solid #ccc;
text-align: center;
}
.wpcf7-form label input {
padding-left: 46px;
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
height: 45px;
border-radius: 0px;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus {
outline: thin solid rgb(232, 10, 20);
outline-offset: -4px;
border-color: #e80a14;
}
input:focus < i {
border-color: #e80a14;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<label for="your-name"> Your Name (required)
<i class="fa fa-users"></i><span class="wpcf7-form-control-wrap your-name"><input type="text" name="your-name" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required form-control" id="your-name" aria-required="true" aria-invalid="false"></span>
</label>
What i am trying to get is there is a border right on focus of input field it needs to be changed the border right colour.