CSS body tag not working after inserting bootstrap navbar

  bootstrap-4, css, html, javascript, jquery

I have added bootstrap to my HTML file with handlebars and added CSS customizations to it. However, after adding the navbar, my body {} customizations which have background color and font are not working. The rest of the customizations in CSS are working How do I solve this?

My CSS code:

body {
  padding: 50px;
  font: 1rem/1.3 "Roboto", sans-serif;
  background-color: rgba(7, 31, 31, 0.664);
}

.heading {
  font-weight: heavy;
  color: #1a0b0b;
  font-size: 2.4rem;
  letter-spacing: 0.05em;
  padding: 0 0 30px 0;
}

.menubar {
  background-image: linear-gradient(-90deg, #573b11b6, #adcad85d);
  color:rgb(255, 255, 255)
}

.nav-link {
  font-size: 20px;
  margin: 3px;
  color:rgba(255, 255, 255, 0.445);
  font-weight: 500;
}

.nav-bar {
  font-family: 'Nunito Sans', sans-serif;
  text-align: right;
  margin-right: 20px;
}

.nav-link:hover {
  font-weight: 400;
  border-bottom: 1px solid rgb(255, 255, 255);
}

body {
  padding: 50px;
  font: 1rem/1.3 "Roboto", sans-serif;
  background-color: rgba(7, 31, 31, 0.664);
}

a {
  color: #134d66;
}

section {
  float: left;
  background: #bdc3c7;
  padding: 10px;
  margin: 30px;
  width: 300px;
  box-shadow: 10px 10px 10px #363c42;
  min-height: 400px;
  border-radius: 20px;
}

section:first-of-type {
  margin-left: 0;
}

section:last-of-type {
  margin-right: 0;
}

section h3 {
  border-bottom: 1px solid black;
  padding-bottom: 5px;
}

.insert {
  background: #6fb68cbb;
}

.get {
  background: #ecf0f1;
}

.update {
  background: #6b97b4ce;
}

.delete {
  background: #c2736a9d;
}

.input label {
  display: block;
  font-weight: bold;
  padding: 2px 0;
}

input,
button {
  font: inherit;
}

button {
  margin-top: 10px;
  border: none;
  box-shadow: 1px 1px 1px #34495e;
  border-radius: 0;
  background: #ecf0f1;
  cursor: pointer;
}

button:hover {
  background: #bdc3c7;
}

.item {
  margin: 10px 0;
  padding: 5px;
  background: #95a5a6;
  border: 1px solid black;
}

My HTML with handlebars code:

<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> 
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/fontawesome.min.css">
   /* <link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:[email protected]&display=swap" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>

<h5 >Name: Syeda Fatima, Student ID: 500840365</h5>
<h1 class="heading">CAR-PARTS Tooling Inventory</h1>

<body>

    <header>
    <div class="menubar">
    <nav class="navbar navbar-expand-md navbar-light">
        <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse">
        <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarCollapse">
        <div class="navbar-nav">
        <a href="#" class="nav-item nav-link active">Home</a>
        <a href="#" class="nav-item nav-link">About</a>
        <a href="#" class="nav-item nav-link">Contact Us</a>
        </div>
        <div class="navbar-nav ml-auto">
        </div>
        </div>
        </nav>
        </div>
</header>



<section class="insert">
    <h3>Insert Data</h3>
    <form action="/insert" method="post">
        <div class="input">
            <label for="PN">PN</label>
            <input type="text" id="PN" name="PN">
        </div>
        <div class="input">
            <label for="partname">PartName</label>
            <input type="text" id="partname" name="partname">
        </div>
        <div class="input">
            <label for="description">Description</label>
            <input type="text" id="description" name="description">
        </div>
        <button type="submit">INSERT</button>
    </form>
</section>
<section class="get">
    <h3>Get Data</h3>
    <a href="/get-data">LOAD DATA</a>
    <div>
        {{# each items }}
            <article class="item">
                <div>PN: {{ this.PN }}</div>
                <div>partname: {{ this.partname }}</div>
                <div>description: {{ this.description }}</div>
                <div>ID: {{ this._id }}</div>
            </article>
        {{/each}}
    </div>
</section>
<section class="update">
    <h3>Update Data</h3>
    <form action="/update" method="post">
        <div class="input">
            <label for="id">ID</label>
            <input type="text" id="id" name="id">
        </div>
        <div class="input">
            <label for="PN">PN</label>
            <input type="text" id="PN" name="PN">
        </div>
        <div class="input">
            <label for="content">partname</label>
            <input type="text" id="partname" name="partname">
        </div>
        <div class="input">
            <label for="author">description</label>
            <input type="text" id="description" name="description">
        </div>
        <button type="submit">UPDATE</button>
    </form>
</section>
</section>
<section class="delete">
    <h3>Delete Data</h3>
    <form action="/delete" method="post">
        <div class="input">
            <label for="id">ID</label>
            <input type="text" id="id" name="id">
        </div>
        <button type="submit">DELETE</button>
    </form>
</section>
</body>
</html>

Source: Ask Javascript Questions

LEAVE A COMMENT