我试图让一系列块适合它们各自的内容,但每个块都留在他们的行中:
+------------------------+
| +--------------+|
| | Some Content ||
| +--------------+|
| +--------------------+|
| | Some Other Content ||
| +--------------------+|
| +-------+|
| | Small ||
| +-------+|
| +-------+|
| | Small ||
| +-------+|
+------------------------+
我能找到的唯一想法inline-block
,float
或position: absolute;
,所有这些想法都会将两个“小”块放在同一行......
关于如何实现这一目标的任何想法?
我的 HTML 非常基础。它看起来像这样(但可以接受建议):
<div class="container">
<div>Some Content</div>
<div>Some Other Content</div>
<div>Small</div>
<div>Small</div>
</div>