强迫物品保持在同一条线上

Pau*_*aul 1 html css line-breaks

这应该相当简单,但在google时我还没有找到任何有用的东西.
我所拥有的是一些文字和一些图标,我想确保它们保持在同一条线上.例如,我想要这个:

Text goes here and eventually we run into the end of the line [text][icon]
Run Code Online (Sandbox Code Playgroud)

或这个:

Text goes here and eventually we run into the end of the line 
[text][icon]
Run Code Online (Sandbox Code Playgroud)

但不是这个:

Text goes here and eventually we run into the end of the line [text]
[icon]
Run Code Online (Sandbox Code Playgroud)

google-ing时我唯一能想到的就是显然IE在实现这一点时遇到了一些问题.我真的不在乎IE是否能够做到(至少还没有),我只是想找到一个解决方案...... :)

Aze*_*utt 5

将它放在一个容器中,为样式表中的whitespace属性指定no-wrap.