扩展列表不移动容器/页脚 [英] Expanding list not moving container/footer
问题描述
我有一个网站,当您展开其中一个列表项时,您可以在此处找到,我无法弄清楚为什么页面的整个高度都没有被修改(页脚不会随着列表扩展而移动).有任何想法吗?预先感谢
I have a website you can find here, when expanding one of the list items, I can't figure out why the the entire height of the page isn't being modified (footer doesn't move with list expansion). Any ideas? thanks in advance
推荐答案
#inside
div设置了height
属性.如果删除它,您将获得想要的行为.
The #inside
div has an height
property set. If you remove it, you'll get the behaviour you want.
编辑
似乎您正在通过javascript设置height
属性,以便使div的height
动画.
It seems you're setting the height
property via javascript in order to animate the div's height
.
在这种情况下,动画制作完成后,可以将height
设置为auto
,这样#inside
div将尊重其子级height
并正确展开.
In this case, after animation's been completed, you could set the height
to auto
, so the #inside
div will respect its children's height
and expand correctly.
$pageWrap.animate({
height: baseHeight + $mainContent.height() + "px"
}, {
complete: function(){
$(this).css('height', 'auto');
}
});
这篇关于扩展列表不移动容器/页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!