我有一个主div包含两个div(一个用于标题和其他内容)。主div被放置在html页面的底部并且具有绝对定位。当我隐藏内容div时,它会占据页面底部的空间。设置显示:无div div内仍占用空间
我需要只显示标题DIV做一个jquery切换..
<div class="tll">
<div class="tllH">
</div>
<div class="tllC">
</div>
</div>
<style>
.tll{
background: yellow;
height: 100px;
width: 100%;
position: absolute;
left: 0;
bottom: 0;
}
.tllH{
background: green;
height: 20px;
width: 100%;
}
.tllC{
background: magenta;
height: 80px;
width: 100%;
display: none;
}
</style>
谢谢,刚刚使用这个答案来修复我自己的打印样式表。 'div.content {width:auto; }'是我所需要的。 – Ryan