My Bootstrap 4 menu has a submenu that appears to the right of the main menu. However, since the menu is positioned on the far right of the screen, it gets cut off on the right side.
I'm looking for a way to make the submenu appear on the left side of the main menu instead of the right.
HTML:
<div class="dropdown dropdown-user-menu">
<button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-option-vertical"></span>
</button>
<div class="dropdown dropdown-menu dropdown-typical dropdown-menu-right">
<a repeat.for="item of statusTypes" click.delegate="editProgramStatus(item)" class="dropdown-item">${item.name}</a>
<div class="dropdown-divider"></div>
<div class="dropdown-more">
<div class="dropdown-more-caption">Choose color...</div>
<div class="dropdown-more-sub">
<div class="dropdown-more-sub-in">
<a class="dropdown-item" href="#"><span class="font-icon font-icon-home"></span>Quant and Verbal</a>
<a class="dropdown-item" href="#"><span class="font-icon font-icon-cart"></span>Real Gmat Test</a>
<a class="dropdown-item" href="#"><span class="font-icon font-icon-speed"></span>Prep Official App</a>
<a class="dropdown-item" href="#"><span class="font-icon font-icon-users"></span>CATprer Test</a>
<a class="dropdown-item" href="#"><span class="font-icon font-icon-comments"></span>Third Party Test</a>
</div>
</div>
</div>
</div>
</div>
CSS:
.dropdown-menu {
border-color: #d8e2e7;
margin-top: 6px;
font-size: 0.8125rem /*13/16*/;
}
.dropup .dropdown-menu {
margin-bottom: 6px;
}
(remaining CSS code omitted for brevity)
EDIT: I found this solution effective:
<div style="left: -95%;" class="dropdown-more-sub">
<div class="dropdown-more-sub-in">
<a class="dropdown-item" href="#"><span class="font-icon font-icon-home"></span>Quant and Verbal</a>
<a class="dropdown-item" href="#"><span class="font-icon font-icon-cart"></span>Real Gmat Test</a>
<a class="dropdown-item" href="#"><span class="font-icon font-icon-speed"></span>Prep Official App</a>
<a class="dropdown-item" href="#"><span class="font-icon font-icon-users"></span>CATprer Test</a>
<a class="dropdown-item" href="#"><span class="font-icon font-icon-comments"></span>Third Party Test</a>
</div>
</div>