扩展列表不移动容器/页脚 [英] Expanding list not moving container/footer

查看:58
本文介绍了扩展列表不移动容器/页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,当您展开其中一个列表项时,您可以在此处找到,我无法弄清楚为什么页面的整个高度都没有被修改(页脚不会随着列表扩展而移动).有任何想法吗?预先感谢

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆