具有id剧院的div的高度不会根据图像的大小而变化,但是当我从img中删除浮动时,剧院的大小会发生变化,为什么会这样?以及如何使高度等于保留在 div 右侧的图像的高度
<div id="theatre">
<img src="http://www.wallmay.net/thumbnails/detail/20120927/abstract%20paintings%20outer%20space%20futuristic%20planets%20hope%20digital%20art%20science%20fiction%20space%20art%20blue%20li_www.wallmay.net_34.jpg"/>
</div>
#theatre{
width:100%;
margin:auto;
position:relative;
border-top:4px solid #fff;
border-bottom:5px solid #fff;
}
#theatre img{
height:400px;
float:right;
}