Chcę, aby fontello, które jest nad inputami znalazło się w ich wnętrzu. Jak mogę to zrobić?
<!DOCTYPE HTML>
<html lang="pl">
<head>
<meta charset="utf-8">
<title>Formularz logowania</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="fontello/css/fontello.css">
</head>
<body>
<i class="icon-user"></i>
<form>
<i class="icon-user-circle"></i><input type="text">
<i class="icon-key"></i><input type="password">
<input type="submit" value="Zaloguj się">
</form>
</body>
</html>
html
{
height: 100%;
}
body
{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
margin: 0;
background: #555;
}
form
{
display: flex;
flex-direction: column;
justify-content: center;
background: #999;
height: 200px;
width: 200px;
padding: 20px;
}
input
{
margin: 5px;
}
i.icon-user
{
position: absolute;
font-size: 80px;
margin-bottom: 21%;
}