Skip to content Skip to sidebar Skip to footer

Bootstrap Responsive Affixed Menu

I want to have an affixed menu as in the bootstrap doc which is not affixed on mobile phones, just as on the bootstrap doc. I've following code:
<

Solution 1:

I just found the answer to my question on the bootstraps doc.css file which they have on their page. You have to add following css (maybe you have to change the class if you are using the affix on a different class)

/* Tablet
------------------------- */
@media (max-width: 767px) {
  .bs-docs-sidenav.affix {
    position: static;
    width: auto;
    top: 0;
  }
}

I also just added the class affix to the bs-docs-sidenav element and didn't use any JavaScript (i.e. the data-spy)


Post a Comment for "Bootstrap Responsive Affixed Menu"