gpt4 book ai didi

html - float DIV 和高度

转载 作者:太空宇宙 更新时间:2023-11-04 04:30:26 24 4
gpt4 key购买 nike

我希望具有不同内容和内容大小的 2 个 div 具有相同的高度。

它们向左漂浮;第一个宽度为 80%,另一个宽度为 20%。

查看完整代码 http://jsfiddle.net/9gp6J/2/

<body>
<div id="contenuto_body">
<p>Etiam vehicula, nisl at venenatis elementum, augue velit malesuada ipsum, id gravida massa enim ut leo.</p>

<p>Etiam vehicula, nisl at venenatis elementum, augue velit malesuada ipsum, id gravida massa enim ut leo.</p>

<p>Etiam vehicula, nisl at venenatis elementum, augue velit malesuada ipsum, id gravida massa enim ut leo.</p>

<p>Etiam vehicula, nisl at venenatis elementum, augue velit malesuada ipsum, id gravida massa enim ut leo.</p>

<p>Etiam vehicula, nisl at venenatis elementum, augue velit malesuada ipsum, id gravida massa enim ut leo.</p>

<p>Etiam vehicula, nisl at venenatis elementum, augue velit malesuada ipsum, id gravida massa enim ut leo.</p>

<p>Etiam vehicula, nisl at venenatis elementum, augue velit malesuada ipsum, id gravida massa enim ut leo.</p>

</div>

<div id="ads">
<img src="http://data.whicdn.com/images/1676707/Happiness_is_only_real_when_shared-Christopher_McCandless-480x360-20100312_large.png"/>
</div>
</body>

最佳答案

考虑使用 display: table-cell 而不是 float。看一下示例:http://jsfiddle.net/26MGE/

关于html - float DIV 和高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17382414/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com