我的目标是让第一个div有固定的宽度,第二个div则是自适应宽度填充父级div中剩余的宽度。
<div class='clearfix'>
<div style='float:left; width:100px;'>some content</div>
<div style='float:left'>some more content</div>
</div>
在这个上面,一切似乎都很顺畅和流畅。
<div style='display:table'>
<div style='display:table-cell; width:100px;'>some content</div>
<div style='display:table-cell'>some more content</div>
</div>
我想选择第二个选项,但我感觉以后会给我带来麻烦。
你能给出一些建议或见解吗?