CSS:不包装div的内容

问题描述:

我有一个固定宽度的div,里面有两个按钮。如果按钮的标签太长,它们会换行 - 一个按钮停留在第一行,下一个按钮位于其下方,而不是靠近它。

I've got a fixed-width div with two buttons in it. If the labels of the buttons are too long, they wrap--one button stays on the first line, and the next button follows underneath it instead of adjacent to it.

如何强制div展开,使两个按钮都在一行上?

How can I force the div to expand so that both buttons are on one line?

尝试 white -space:nowrap;