Placing banner above the Bootstrap 3 navbar?

26.6k views Asked by At

I have this Bootstrap 3 navbar: http://www.bootply.com/xkcDjvQslb

I want the following modifications:

  1. Add banner above the fixed navbar
  2. Hide the banner when I scroll down

I saw the following example: http://www.bootply.com/69848; not great at bootstrap and when I pull the relevant code it breaks my menu.

The banner (above the navbar) would be a table with a logo on the left side and title on the right. I need someone to point me in the right direction?

2

There are 2 answers

0
Chaka On BEST ANSWER

I found the solution here: http://jsfiddle.net/DTcHh/541/ , just needed to clean up my code:

topnavbar {
    margin: 0;
}
#topnavbar.affix {
    position: fixed;
    top: 0;
    width: 100%;
}

#banner {
     background-color: yellow;   
}
1
Rafael On

Remove navbar-fixed class in nav. Then place markup above the nav.

http://www.bootply.com/vxJEiv1RC2