Topic: Image in dropdown menu
I Tried to insert an image in my dropdown link. But when I click on it the menu is not showing. Instead I have to click on the text in the link to display the dropdown.
If I put a span, or an icon or an image I cannot activate the dropdown by clicking on them, I have to click on the text that is directly in the link.
How can I have a dropdown link button with an image and some text ?
Here is a sample of my html code :
<div mdbDropdown class="dropdown"> <a class="dropdown-toggle nav-link" role="button" id="dropdownMenuLink" mdbDropdownToggle aria-expanded="false" >Clickable <span class="hideText">Not clickable</span> <i class="fas fa-home "></i> </a> <ul mdbDropdownMenu class="dropdown-menu" aria-labelledby="dropdownMenuLink" > <li><a class="dropdown-item" href="#">Mon compte</a></li> <li><a class="dropdown-item" href="#">Déconnexion</a></li> </ul>
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: MDB5 1.0.0-beta5
- Device: Computer
- Browser: Firefox
- OS: Windows
- Provided sample code: No
- Provided link: No