The input field is getting hidden by the fixed header when the input is invalid.
Is it possible to modify or disable the autoscrolling of the input required attribute ?
<!DOCTYPE html>
<html>
<body>
<style>
body {
margin: 0;
}
header {
width: 100%;
height: 50px;
position: fixed;
color: red;
background: #b2b2b2;
opacity: 0.6;
}
form {
padding-top: 65px;
}
</style>
<header>Input Testing</header>
<form action="demo_form.asp">
Username: <input type="text" name="usrname" required>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
<p><strong>Note:</strong> The required attribute of the input tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.</p>
<input type="submit">
</form>
</body>
</html>
https://jsfiddle.net/0z56f24f/
The best solution would be adding a margin of the header height to the scrolling position to display it correctly.