I am struggeling with a problem. My input field border (when typing) is smaller than the div field (the border is just as big as the placeholder), as you can see on the picture below.
The css code for the input field is the following:
.form_login_username
{
position: relative;
width: 100%;
background-color: white;
border-radius: 5px;
border: 1.2px solid #4d4d4d;
padding: 12px 20px;
margin-bottom: 15px;
}
.form_login_username img
{
position: absolute;
top: 1px;
left: 5px;
}
.form_login_username input
{
border: none;
width: 100%;
padding-left: 45;
box-sizing: border-box;
}
The html code for the input field is this one:
<div
class = "form_login_username">
<img
src = "User_Icon.png"
width = "40" />
<input
type = "text"
name = "username"
placeholder = "Enter your username"
required />
</div>
And I set the color for the field (when I am typing) in the style part of my html element:
input:focus
{
border: none;
outline: 1.2px solid #feb434;
}
Please help me, I don't know why the border is so small. Thank you!
Edit: Finally solved my problem. For everyone else who struggels with this problem, just put the "padding" into the input css style, instead of the div css style. My problem was, that the white field wasn't the input field, but the div field, so put the padding value into your input css style and the border will appear around the white field :)