CSS - relative positioned parent div not stretching to absolute child div height

后端 未结 5 911
执念已碎
执念已碎 2020-11-28 07:08

I\'ve been googling this all morning and can\'t seem to get it to work:

I have a parent DIV with Relative positioning and a two column child DIV setup inside of it,

5条回答
  •  -上瘾入骨i
    2020-11-28 08:01

    Dark side of the force is a pathway to many abilities some consider to be unnatural.

    $(document).ready(function() 
    {
         var objHeight = 0;
         $.each($('#content').children(), function(){
                objHeight += $(this).height();
         });
         $('#content').height(objHeight);
    });​
    

提交回复
热议问题