While working with Bootstrap to create a top navbar on my webpage, I encountered some issues:
Once the navbar dropdown is opened, I need to display an option list alongside an image positioned to the right of the list. The image should be the same height as the list, similar to what is shown in the provided image.
I managed to achieve this by setting fixed dimensions for the image, but the problem arises when the list expands beyond those set dimensions.
Another approach I considered was incorporating a div that includes both the list and the image, then setting the image size to 100%. However, upon doing this, the dropdown functionality seems to break (presumably due to interfering with Bootstrap's structure for toggling the dropdown). Am I correct in assuming this?
How can I successfully implement this solution?
https://i.stack.imgur.com/pmbRS.png
<div id="navbar" class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav top-elements">
<li id="dropdown-produtos" class="dropdown">
<a href="#" class="dropdown-toggle text-uppercase top-text" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Nossos Produtos<span class="caret top-caret"></span></a>
<!-- div was here --> <ul class="dropdown-menu dropdown-menu-produtos">
<li class="dropdown-item-active">
<a href="#" class="dropdown-item-description">texto1</a>
<ul class="dropdown-menu img-dropdown">
<img src="assets/img.png">
</ul>
</li>
<li class="dropdown-item">
<a href="#" class="dropdown-item-description">texto2</a>
</li>
<li class="dropdown-item"><a href="#" class="dropdown-item-description">texto3</a></li>
<li class="dropdown-item"><a href="#" class="dropdown-item-description">texto4</a></li>
<li class="dropdown-item"><a href="#" class="dropdown-item-description">texto5</a></li>
</ul>
</li>
</ul>
</div>