Thamidu de Harshitha
Thamidu de Harshitha

Reputation: 373

How can I stop a div that is scrolling over the navbar?

Recently I am working on a new website and I am creating it with bootstrap. Here is the bootply link that have my website.

http://www.bootply.com/9pUX4JwEYb

According to that HTML in this Link, I have a trouble that i cant fix yet. When I am scrolling up, the text "Main Bodysssss..." is going over the navigation bar. I have tried to position it but no help. Just tell me how to fix this. Many Thanks.

Upvotes: 0

Views: 974

Answers (1)

John Bupit
John Bupit

Reputation: 10618

A higher z-index for .navbar should fix this (working example):

.navbar {
  z-index: 10;
}

From the documentation,

When elements overlap, z-order determines which one covers the other. An element with a larger z-index generally covers an element with a lower one.

Upvotes: 2

Related Questions