@filrodir

Почему кнопка-бургер в бутстрап не работает если я добавляю 2 меню?

<!-- The first menu /-->
	<div class="menu-settings">
<div class="container p-3 p-lg-2">
<nav class="navbar navbar-expand-lg">

  <button class="navbar-toggler navbar-light" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav">
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle menu-settings_item" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          English
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
          <a class="dropdown-item" href="#">Deutsch</a>
          <a class="dropdown-item" href="#">Portuguse</a>
          <a class="dropdown-item" href="#">Русский</a>
        </div>
      </li>
 

      

    </ul>
       <div class="col-lg">
      	<ul class="navbar-nav justify-content-lg-end">
	<li class="nav-item active">
        <a class="nav-link menu-settings_item" href="#">Contact Center</a>
      </li>
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle menu-settings_item" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          Country Profile
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
          <a class="dropdown-item" href="#">the USA</a>
          <a class="dropdown-item" href="#">the Great Britain</a>
          <a class="dropdown-item" href="#">Deutschland</a>
          <a class="dropdown-item" href="#">Portugalia</a>
        </div>
      </li>
      	</ul>
      </div>
  </div>
</nav>
</div>
	</div>

	<!-- The second menu /-->
	<div class="primary-menu">
	<div class="container col-lg-12">
		<nav class="navbar navbar-expand-lg">
  <img src="img/dhl_logo.png" alt="image" class="navbar-brand">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse offset-lg-2" id="navbarSupportedContent">
    <ul class="navbar-nav">
    <li class="nav-item active">
        <a class="nav-link primary-menu_link" href="#">Link</a>
     </li>
     <li class="nav-item active">
        <a class="nav-link primary-menu_link" href="#">Link</a>
     </li>
     <li class="nav-item active">
        <a class="nav-link primary-menu_link" href="#">Link</a>
     </li>
     <li class="nav-item active">
        <a class="nav-link primary-menu_link" href="#">Link</a>
     </li>
     <li class="nav-item active">
        <a class="nav-link primary-menu_link" href="#">Link</a>
     </li>
    </ul>
    <form class="form-inline my-2 my-lg-0 col-lg offset-lg-7">
      
      <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
    </form>
  </div>
</nav>
	</div>
	</div>
  • Вопрос задан
  • 147 просмотров
Пригласить эксперта
Ответы на вопрос 1
@filrodir Автор вопроса
во втором меню надо писать:
<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <a class="navbar-brand" href="#">Navbar</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
<b>  <div class="collapse navbar-collapse" id="navbarNav"></b>
    <ul class="navbar-nav">
      <li class="nav-item active">
        <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Features</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Pricing</a>
      </li>
      <li class="nav-item">
        <a class="nav-link disabled" href="#">Disabled</a>
      </li>
    </ul>
  </div>
</nav>
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы