Uzer Uzer - 2 years ago 118
HTML Question

Div is overlapping one another


I'm trying to add another section under the jumbotron but it overlaps jumbotron for some reason..

Here is my code

Answer Source

Section overlaps because you have applied position: absolute on jumbotron. Elements with absolute or fixed are taken out from the normal flow of DOM so they overlap with other elements. You can set your navbar with position: absolute rather than jumbotron and it will work.

Sample Code

<nav class="navbar">
     // navigation
<div class="jumbotron">
    // jumbotron
<div class="next-section">
    // next section

body {
    position: relative;

.navbar {
    position: absolute;
    z-index: 10;
    right: 0;
    left: 0;
    top: 0;

.jumbotron {
    height: 100vh;
    width: 100%;

.next-section {
  // styling will go here...

I've updated your code, have a look at it. You can play with css to make it exactly according to your needs. Link

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download