I am trying to incorporate a dropdown profile into my navbar, but it is not appearing where it should be located: pic1
<link href="https://bootswatch.com/4/materia/bootstrap.min.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary nav-header">
<a class="navbar-brand" href="#">TEST</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="#">Home</a>
</li>
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Courses
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="webinars">Webinars</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Library</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Instructions</a>
</li>
</ul>
<ul class="proflie-dropdown navbar-nav">
<li class="nav-item d-inline">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Username
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<img class="float-left" src="img/users/kolyan.jpg" alt="">
<p>Username</p>
<br>
<br>
<p class="float-left">Name</p>
<p>Surname</p>
<p>Status</p>
<div class="dropdown-divider"></div>
<div class="btn-group" role="group" aria-label="Basic example">
<a class="btn btn-secondary" href="#">Open Profile</a>
<a class="btn btn-danger" href="#">Exit</a>
</div>
</div>
</li>
</ul>
</div>
</nav>
The alignment of the dropdown menu with the button is crucial to ensure it stays within the page boundaries. See an example here.
P.S. As a Russian speaker, I apologize for any language errors. Please provide feedback in the comments if needed.