0

So, here is a quick JSFiddle to demonstrate my problem.

Problem is, after having played with the offset, it happens that the div#TL should be shorter than before, but it isn't.

So, I'm looking for a way to reset the div#TL depending of the height it should have. Problem is, I can't know before which of the 2 columns will be the longest.

4

1 回答 1

0

你不会通过改变relative/block/float子项的顶部位置来改变relative/float/block的高度;它不是那样工作的

要么创建 2 列,甚至不需要重新定位任何东西,要么在定位孩子后设置高度/溢出

   $TL.css({

        overflow : "hidden",
        height : $TL.height()+math.Min($TL.find(".TLItem").map(function() {
                                            return   $(this).css("top");
                                               })
                                      )
       });

(我会改变html结构)

于 2013-01-18T02:25:35.073 回答