Struggling to design a user login page for my webapp, specifically getting the username image and input to display next to each other. It used to work fine, but now they won't align properly.
I know it's a mess, anyone spot the issue here? I'm more comfortable with backend development...
Attempting to use the inline command to fix it, but it's messing up the styling.
* {
box-sizing: box-sizing: border-box;
;
font-family: -apple-system, BlinkMacSystemFont, "segoe ui", roboto, oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", Arial, sans-serif;
font-size: 16px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
background-color: #435165;
height: 80vh;
display: flex;
align-items: center;
justify-content: center;
}
.login {
background-color: #ffffff;
box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3);
margin: 1px auto;
width: 360px;
height: min-content;
padding: 5px;
border-radius: 12px;
}
.login h1 {
text-align: center;
color: #5b6574;
font-size: 24px;
padding: 20px 0 20px 0;
border-bottom: 1px solid #dee0e4;
}
.login form {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding-top: 20px;
}
.login form label {
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 50px;
background-color: #3274d6;
color: #ffffff;
}
.login form input[type="password"],
.login form input[type="text"] {
width: 310px;
height: 50px;
border: 1px solid #dee0e4;
margin-bottom: 5px;
padding: 0 15px;
}
.login form input[type="submit"] {
width: 100%;
padding: 15px;
margin-top: 20px;
background-color: #3274d6;
border: 0;
cursor: pointer;
font-weight: bold;
color: #ffffff;
transition: background-color 0.2s;
}
.login form input[type="submit"]:hover {
background-color: #2868c7;
transition: background-color 0.2s;
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css">
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dbb9b4b4afa8afa9baab9beef5eaf5e8">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e0828f8f949394928190a0d5ced1ced3">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>
<!-- <link rel="stylesheet" href="style.css"> -->
<div class="login">
<h1 class="text-center">Login</h1>
<form action="authenticate.php" method="post">
<div class="form-group was-validated">
<label class="form-label" for="username">
<i class="fas fa-user"></i>
</label>
<input class="form-control" type="text" name="username" placeholder="Username" id="username" required>
</div>
<div class="form-group was-validated">
<label class="form-label" for="password">
<i class="fas fa-lock"></i>
</label>
<input class="form-control" type="password" id="password" required>
</div>
<input class="btn btn-success w-100" type="submit" value="Enter">
</form>
</div>