[英]Menu text long break - fit next line
I have a menu and there is a item where the text is to long and break. 我有一个菜单,并且有一个项目在其中文本要长和中断。 How can the second line fit with the above? 第二行如何与以上相符?
<ul class="sidr-class-sub-menu" style="display: block;">
<li id="sidr-id-menu-item-14176" class="sidr-class-menu-item sidr-class-menu-item-type-post_type sidr-class-menu-item-object-page sidr-class-menu-item-14176"><a href="https://wave-akademie.de/fb-medien/">FB MEDIEN ÜBERSICHT</a></li>
<li id="sidr-id-menu-item-14146" class="sidr-class-menu-item sidr-class-menu-item-type-post_type sidr-class-menu-item-object-page sidr-class-menu-item-14146"><a href="https://wave-akademie.de/ausbildung/musik-und-medienmanagement/">MUSIK- UND MEDIENMANAGEMENT<i class="sidr-class-menu-item-desc">(Staatlich anerkannt)</i></a></li>
</ul>
If you want the second line and first line to be on the same line, like. 如果您希望第二行和第一行在同一行,例如。
MUSIK-UND MEDIENMANGEMENT MUSIK-UND MEDIENMANGMENT
Somethings you can try? 您可以尝试的东西吗?
You can add white-space: nowrap;
您可以添加white-space: nowrap;
to the li
elements. 到li
元素。 That would help prevent them from wrapping. 这将有助于防止它们包装。
If you're looking to prevent the second list item from line-breaking use the following: 如果您要防止第二个列表项断行,请使用以下命令:
ul { white-space: nowrap; }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.