Expanding list not moving container/footer

↘锁芯ラ 提交于 2019-12-12 03:08:55

问题


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


回答1:


The #inside div has an height property set. If you remove it, you'll get the behaviour you want.

Edit

It seems you're setting the height property via javascript in order to animate the div's 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');
    }
});



回答2:


One of your divs has a manual style on it:

<div id="inside" style="height: 367px;">

Remove / disable that and your page container resizes accordingly :)



来源:https://stackoverflow.com/questions/15233411/expanding-list-not-moving-container-footer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!