wordpress min-height不起作用

时间:2017-01-24 11:07:25

标签: css wordpress html5 css3 wordpress-theming

我有一个WordPress网站http://fa.tamidhco.ir/。 第一次加载页面时,具有caroufredsel_wrapper类的div在底部有一个空白区域。 似乎height属性随jQuery而变化。我应该怎么做才能使height属性随内容而变化?

<div class="caroufredsel_wrapper" style="display: block; text-align: start; float: none; position: relative; top: auto; right: auto; bottom: auto; left: auto; z-index: auto; width: 703px; height: 724px; margin: 0px; overflow: hidden; cursor: move;">
  <ul class="offer_thumb_ul" style="text-align: left; float: none; position: absolute; top: 0px; right: auto; bottom: auto; left: 0px; margin: 0px; width: 4921px; height: 724px;"><li class="offer_thumb_li id_1" style="width: 703px;">
    <div class="image_wrapper">

1 个答案:

答案 0 :(得分:0)

首先,您需要通过jQuery获取'caroufredsel_wrapper'类的实际高度。

var heightofdiv = $( ".caroufredsel_wrapper" ).innerHeight();

然后你可以通过jQuery css应用高度。

$(".caroufredsel_wrapper").css("height", heightofdiv);
相关问题