My current page looks like this: https://i.stack.imgur.com/J5s7W.png
I want a div container between top navbar and the footer. So that all the green content is a div.
Because I want a centered box in the middle of the green content (It will be a login form). The thing is, that I don't know how to do that.
If im creating a <div>
under my <nav>
, the div behind the navbar (its not visible).
This is my Code and css:
<!doctype html>
<html lang="de">
<head>
<title>Login</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">Navbar</a>
</nav>
<div class="container">
<div class="row">
<div class="col-sm">
Test
</div>
</div>
</div>
<!-- Footer -->
<nav class="navbar fixed-bottom navbar-expand navbar-dark bg-dark">
<a class="navbar-brand mx-auto" href="#">Footer</a>
</nav>
<!-- Javascript always on bottom -->
...
</body>
And this is my CSS
body
{
background-color: #417239
}
I don't see the container. And in Developer mode of my Browser, the div is here: https://i.stack.imgur.com/hkG38.png
Why isn't it under the navbar? It should fill all the green content (resizable). And How I can create a block which is in the middle of the green content? (That's why I need a "main" div).