即使我設(shè)置了導(dǎo)航條,它也會出現(xiàn)在登錄頁面的旁邊。我該如何解決?我希望導(dǎo)航條在頂部,但即使我用css修復(fù)它,它仍然在登錄頁面旁邊。
我的問題仍然存在。我需要幫助)):
這是我的CSS代碼。但我沒發(fā)現(xiàn)任何問題。你能看看嗎?
我到處都找遍了,但沒找到。
<body>
<nav class="navbar navbar-expand-lg bg-dark navbar-dark text-white">
<div class="container py-2">
<a class="navbar-brand" href="#">WebKent</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-webkent" aria-controls="navbar-webkent">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbar-webkent">
<ul class="navbar-nav ml-auto">
<li class="nav-item px-3">
<a class="nav-link text-white" href="hakkimizda.html">Hakk?m?zda</a>
</li>
<li class="nav-item px-3">
<a class="nav-link text-white" href="kayit.html">Kay?t Ol</a>
</li>
<li class="nav-item px-3">
<a class="nav-link text-white" href="oturum.html">Oturum A?</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="login">
<form action="">
<div class="form-group">
<label class="form-label" for="email">E-Mail Adresiniz</label>
<input class="form-control" type="email" name="" id="email">
</div>
<div class="form-group">
<label class="form-label" for="password">?ifre</label>
<input class="form-control" type="password" name="" id="password">
</div>
<div class="form-group form-check">
<input class="form-check-input" type="checkbox" name="" id="check">
<label class="form-control-label" for="check">Beni Hat?rla</label>
</div>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.login{
width: 360px;
height: min-content;
padding: 20px;
border-radius: 12px;
background-color: #fff;
}
.login h1{
font-size: 34px;
margin-bottom: 25px;
}
.login form {
font-size: 20px;
}
.login form .form-group {
margin-bottom: 12px;
}
.login form input[type="submit"] {
font-size: 20px;
margin-top: 15px;
}
.navbar-brand {
position: relative;
background: url(./img/webkent.png);
width: 170px;
left: 15px;
right: 200px;
padding-bottom: -100px;
}