页面上的高度来自未知来源

时间:2022-12-05 22:58:06

I usually build my wordpress sites by using a theme and creating a child theme. Generally I have done this with Wordpress 2013, but this time decided to take a crack at it with 2014. I have run into a few issues but finally landed on one I have not been able to resolve.

我通常使用主题和创建子主题来构建我的wordpress网站。一般来说,我已经使用Wordpress 2013完成了这项工作,但这一次决定在2014年采取行动。我遇到了一些问题,但最终落到了一个我无法解决的问题上。

http://demo.diocesan.com/robert/

On this page, it tells me the page has a height of 2000+ px. When I try to find where this height is computed, I find nothing. I have set the height on many different elements to 1000px (even the HTML tag itself) and I still have this mysterious height value.

在这个页面上,它告诉我页面的高度为2000+ px。当我试图找到这个高度的计算位置时,我一无所获。我已经将许多不同元素的高度设置为1000px(即使是HTML标签本身),我仍然拥有这个神秘的高度值。

I suspect this has something to do with the 2014 masonry script (Admittedly I am not great with javascript) and any direction on this would be helpful. So my question - Does anyone upon glancing at this know where the height is coming from and what steps I can take to remove it?

我怀疑这与2014年的砌体脚本有关(不可否认我对javascript不太好),任何方向都会有所帮助。所以我的问题 - 有人在看这个时知道高度来自哪里以及我可以采取哪些措施来消除它?

1 个解决方案

#1


0  

The problem is the CSS on #secondary - it has min-height: 100vh applied, which will make that one element at least one full viewport tall.

问题是#secondary上的CSS - 它有min-height:100vh应用,这将使一个元素至少有一个完整的视口高。

It's then hidden because the following element (#primary) which contains the content is given a float: left which makes it move up, so that it appears that the gap is beneath #primary, even though it's not.

它然后被隐藏,因为包含内容的以下元素(#primary)被赋予一个float:left,这使得它向上移动,因此看起来差距在#primary之下,即使它不是。

Removing the min-height on #secondary, or setting it to a sensible value, will fix your problem.

删除#secondary上的最小高度,或将其设置为合理的值,将解决您的问题。

#1


0  

The problem is the CSS on #secondary - it has min-height: 100vh applied, which will make that one element at least one full viewport tall.

问题是#secondary上的CSS - 它有min-height:100vh应用,这将使一个元素至少有一个完整的视口高。

It's then hidden because the following element (#primary) which contains the content is given a float: left which makes it move up, so that it appears that the gap is beneath #primary, even though it's not.

它然后被隐藏,因为包含内容的以下元素(#primary)被赋予一个float:left,这使得它向上移动,因此看起来差距在#primary之下,即使它不是。

Removing the min-height on #secondary, or setting it to a sensible value, will fix your problem.

删除#secondary上的最小高度,或将其设置为合理的值,将解决您的问题。