Firefox unexpected line break using floats & overflow hidden

我们两清 提交于 2019-11-29 03:39:08

Add display: inline-block; to .box:

Demo

I came across this issue today where the floating node would break line only in Firefox even after setting its display to inline-block and the reason for that was that the container node had a style setting of white-space set to nowrap. So resetting the value of white-space to normal on the container node resolved this issue for me.

Actually, when you are going for a solution like http://jsfiddle.net/Volker_E/x5rPd/ you don't need a second div for your desired behavior.

montagproject

white-space: normal didn't do the trick for me. What worked was white-space: nowrap; on the direct text container.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!