I have some required fields in the form. For required fields I want 1px red border for highlighting form fields after form submit. Chrome is doing that perfectly. IE is giving troubles with default and broad borders. How to get rid of those?
HTML source code:
<div class="tableRow">
<div class="tableCell fieldCaption borderBottom normalFontWeight">{{'_PHONE_'|i18n}}<span class="mandetory">*</span></div>
<div class="tableCell fieldValue borderBottom">
<input type="text" name="phoneValueInput" ng-class="{submitted:createCallBackForm.phoneValueInput.$invalid}" ng-model="taskDto.ContactPhoneNumber" placeholder="{{'_PHONE_NUMBER_'|i18n}}" required validation-message="{{'_MSG_EMPTY_PHONE_NUMBER_'|i18n}}"/>
</div>
</div>
CSS:
input.submitted.ng-invalid {
border: red 1px solid;
}
Code served to IE 11:
<div class="tableRow">
<div class="tableCell fieldCaption borderBottom normalFontWeight ng-binding">Telefoon<span class="mandetory">*</span></div>
<div class="tableCell fieldValue borderBottom">
<input name="phoneValueInput" class="ng-isolate-scope ng-invalid ng-invalid-required ng-dirty" style="margin-left: 10px;" required="" type="text" placeholder="Telefoonnummer" ng-model="taskDto.ContactPhoneNumber" ng-class="{submitted:createCallBackForm.phoneValueInput.$invalid}" validation-message="Telefoonnummer kan niet leeg zijn">
</div>
</div>
Code served to Chrome (Version 35.0.1916.114 m):
<div class="tableRow">
<div class="tableCell fieldCaption borderBottom normalFontWeight ng-binding">Phone<span class="mandetory">*</span></div>
<div class="tableCell fieldValue borderBottom">
<input type="text" name="phoneValueInput" ng-class="{submitted:createCallBackForm.phoneValueInput.$invalid}" ng-model="taskDto.ContactPhoneNumber" placeholder="Phone Number" required="" validation-message="Phone number can not be empty" class="ng-isolate-scope ng-pristine ng-invalid ng-invalid-required">
</div>
</div>
Similar kind of scenario can be seen here: http://jsfiddle.net/trixta/qTV3g/
This ugly appearance in IE is caused by the outline property. You can remove it with this:
input:required:invalid {
outline: none;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With