Bootstrap footer is overlapping the button on the content page
I have the follwoing code on my _layout.cshtml page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Package</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="stylesheet" href="~/FeeCalc.styles.css" asp-append-version="true" />
</head>
<body style="background-color:cadetblue">
<header>
<nav class="navbar" style="background-color: #264653; position:absolute; top:0px; left:50%; transform:translateX(-50%); width:100%; ">
<div class="container-fluid">
<span class="navbar-brand" style="display:flex;">
<a href="https://www.google.com">
<img src="~/Img/Logo_Circle.png" alt="ACR" width="80" height="80" class="d-inline-block align-middle mr-2" runat="server" />
</a>
<span style="font-size:25px;color:white;"><span style="color:#e9c46a">Test city</span><br />Test Company</span>
</span>
<span class="d-inline-block align-middle mr-5" style="font-size:19px;color:white;">Welcome, @_contextAccessor.HttpContext.Session.GetString("FullName")</span>
</div>
</nav>
</header>
<div class="container-bg">
<div class="container">
<main role="main" class="pb-5">
@RenderBody()
</main>
</div>
</div>
<footer class="bg-light text-center footer text-lg-start">
<!-- Copyright -->
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.2);">
<span class="text-dark"> © Copyright 2023 Test Company | Version 1.0</span>
</div>
<!-- Copyright -->
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>
My content page submit button is overlapping the footer. Not sure why it is doing that.
My content page has lot of DIV with input text in between
<div class="form-group row">
<div class="col">
below is the code for submit button
<div class="form-group" style="margin-top:20px" >
<input style="float: right; margin-bottom:20px" type="submit" value="Submit" class="btn btn-primary" />
</div>
I want the footer width to be really less and I want the submit button to be seen clearly.
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */
a.navbar-brand {
white-space: normal;
text-align: center;
word-break: break-all;
}
/* Provide sufficient contrast against white background */
a {
color: #0366d6;
}
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
/* Sticky footer styles
-------------------------------------------------- */
html {
font-size: 14px;
}
@media (min-width: 768px) {
html {
font-size: 16px;
}
}
.border-top {
border-top: 1px solid #e5e5e5;
}
.border-bottom {
border-bottom: 1px solid #e5e5e5;
}
.box-shadow {
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}
button.accept-policy {
font-size: 1rem;
line-height: inherit;
}
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
white-space: nowrap;
line-height: 60px; Vertically center the text there
}
.container-bg {
background-color: white;
margin-top: 150px;
margin-left: 10%;
margin-right: 20%;
/* width: 1000px;*/
border-radius: 10px;
justify-content: center;
padding-left: 30px;
border: 1px solid black;
align-content: center;
align-self: center;
vertical-align: middle;
width: 80%;
}
.crds {
background-color:#264653;
color:white;
}
Any help will be highly appreciated.