<div id="post">
<img src="image.png"/>
<div class="postbox">
some content here
</div>
</div>
我如何使`.postbox'將其寬度擴大到相對於圖像寬度或無圖像的最大寬度?流體格寬
#post{
width:569px;
overflow:hidden
}
#post img, #post .postbox{
float:left
}
我試圖width:100%
到.postbox
但它佔用了整個寬度。
不上浮它剩下的就是怎麼樣。你可以將「
」浮起來嗎? –
Bojangles
@JamWaffles仍然不佔用圖像的整個寬度寬度 – FBwall