Issue
I have to add a little dropdown to the right side of my navbar. I'm trying to set a width to a elements by adding a new CSS class which set the width, but nothing I tried works.
<li class="nav-item dropdown">
<a href="#"
id="navbarDropdown"
data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false"
class="nav-link dropdown-toggle">
some text
</a>
<div aria-labelledby="navbarDropdownLangMenu"
class="dropdown-menu">
<a class="dropdown-item">AA</a>
<a class="dropdown-item">BB</a>
</div>
</li>
Everything works fine, except the width of a elements. Every link has only two characters, but the width of them is very large and it goes beyond the width of the screen:
Solution
There is a min-width on the dropdown menu in bootstrap. You can reset it like this:
.dropdown-menu {
min-width:inherit;
}
Answered By - Wimanicesir
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.