Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图让两个 div 并排出现,如下所示:
float: left
float: right
问题是我没有width为任何这些 div 设置集合,所以它们只占用尽可能多的空间:jsFiddle
width
我找到了几种解决方案,但它们都需要为其中一个 div 设置宽度,这是我试图避免的。任何可能的解决方案?
#left, #right { display: table-cell; } #left { white-space: nowrap; }
http://jsfiddle.net/CoryDanielson/LzREv/5/