To force category names to stay on one line in drop-down menus, you can use CSS to prevent text wrapping. Here’s a quick solution:
.dropdown-menu li a {
white-space: nowrap;
}
This CSS rule applies the nowrap property to the anchor tags within the dropdown menu, ensuring that the text stays on a single line. If the text is too long, it will overflow horizontally, so you may also want to set a max width and enable text truncation:
.dropdown-menu li a {
white-space: nowrap;
max-width: 200px; /* Adjust as necessary */
overflow: hidden;
text-overflow: ellipsis;
}