CSS:不包装div的内容 [英] CSS: Do not wrap contents of div

查看:123
本文介绍了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;

这篇关于CSS:不包装div的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆