how to align all my li on one line?

前端 未结 7 1231
灰色年华
灰色年华 2020-12-31 02:57

my CSS

ul{
overflow:hidden;
}
li{
display:inline-block;
}

my HTML

  • a
  • b
7条回答
  •  傲寒
    傲寒 (楼主)
    2020-12-31 03:35

    I think the NOBR tag might be overkill, and as you said, unreliable.

    There are 2 options available depending on how you are displaying the text.

    If you are displaying text in a table cell you would do Long Text Here. If you are using a div or a span, you can use the style="white-space: nowrap;"

提交回复
热议问题