Bootstrap 3.0 Button in Navbar

后端 未结 5 1422
春和景丽
春和景丽 2021-01-30 07:57

I upgraded bootstrap 3.0 now. And \"a\" tag which looks like btn (by the help of class .btn) is ruined on navbar.

  • 5条回答
    •  心在旅途
      2021-01-30 08:31

      The problem is that the selector for styling an anchor in a navbar is: .nav > li > a which means it has a higher precedence than a .navbar-btn.

      You can fix by just wrapping it in another tag like a span. I don't think you should use a form tag as others suggest as it's not a form at all.

    提交回复
    热议问题