I have the following code to represent a floating action button:
.dropup .hide-toggle.dropdown-toggle::after {
display: none !important;
}
<div >
<button type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">
<i ></i>
<span >Add Category</span>
</button>
<ul >
<li>
<a href="#">...</a>
</li>
</ul>
</div>
But I'm having an issue hiding the toggle icon in the .dropdown-toggle
despite having a CSS rule to have it not display.
What can I do to remove the icon?
CodePudding user response:
Are you sure it's not working? I see no icon here.
.dropup .hide-toggle.dropdown-toggle::after {
display: none !important;
}
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<div >
<button type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">
<i ></i>
<span >Add Category</span>
</button>
<ul >
<li>
<a href="#">...</a>
</li>
</ul>
</div>