Topic: Drop down menu - expand width to fit content
Yiannis Kyriazidis asked 3 years ago
Im using the drop down menu but the custom content is beeing wrapped to the width of the container dropdown-menu. How do you make it so the drop down menu width is automatically adjusted to fit the child content so that it doesnt get wrapped into multiple lines.
see example https://mdbootstrap.com/snippets/standard/yiannis_kyriazidis/3619107
Michał Duszak staff answered 3 years ago
Use CSS to modify dropdown-menu
container, for example:
.dropdown-menu {
width: max-content;
}
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 3.10.2
- Device: windows desktop
- Browser: chrome
- OS: windows
- Provided sample code: No
- Provided link: Yes