Bootstrap Navbar Fixed Top overlapping the carousel slider

0

I'm making a navbar fixed top menu and I want this menu to accompany the scroll when the page slides, but the navbar is overlapping the section just below that is the slider. I wanted to know how to put it in position without overlapping the slider as well as sliding along with the scroll.

The jsfiddle link

    
asked by anonymous 21.01.2016 / 18:31

1 answer

2

Man, to use Navbar-Fixed-Top we need to assign a padding value to the body element because Navbar in CSS is positioned as position: fixed ", and with this attribute, it has no influence on the other elements of the screen, ie it will not" push "the content down.

Just add this in CSS

/*Para dispositivos com width menor que 768px*/
body {
  padding-top: 290px;
}

/*Para dispositivos com width maior ou igual a 768px*/
@media (min-width: 768px) {
 body {
     padding-top: 220px;
  }
}

See how it went: link

    
21.01.2016 / 19:04