在网站底部的空白处 [英] White space at bottom of site

查看:127
本文介绍了在网站底部的空白处的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图在即将到来的投资组合网站的底部消除这个空白区域: http://codymiracle.com/



发生什么情况是页脚在最靠近显示器上似乎太长或太短。我可以在真正微小的窗口上看到卷轴,或者更常见的是更大的分辨率产生一点我无法摆脱的空白空间。



随意使用视图页面源代码等来查看我的CSS和HTML。我不是一个网页设计师,只参加一节课,慢慢拼凑起来。请让我知道,如果你发现任何可以解决它。



我试过的东西:


  • 增加高度:100%给我body

  • 添加overflow:隐藏到我的contentFooter中

  • 添加overflow:hidden!对我的contentFooter重要
>

解决方案

我在所有网站的底部都有空白空间;这是我解决这个问题的方法:



当你调试这样的CSS问题时,你可以做的第一件也是最好的事情是添加:

  * {border:1px solid red; } 

这个CSS行在所有HTML元素周围放置一个红色框。

由于Chrome扩展程序存在错误,我的页面底部留有空白区域,因此添加了 div #dp_swf_engine 到我的页面底部:

 < div id = dp_swf_enginestyle =position:absolute; width:1px; height:1px;>< / div> 

没有红色框,我从来没有注意到1px的div。然后我摆脱了错误的扩展,并将 #dp_swf_engine 上的 display:none 作为次要度量。 (谁知道什么时候可以回来在我的页面底部为我的所有页面和应用程序添加随机空白区域!)


I am trying to eliminate this white space at the bottom of my upcoming portfolio site: http://codymiracle.com/

What occurs is the footer seems to either be too long or too short on -most- monitors. Either I get a scroll on really tiny windows, or more commonly larger resolutions produce a small bit of white space that I can't seem to get rid of.

Feel free to use the view page source etc to view my CSS and HTML. I'm not a web designer at heart, only taken one class and this is pieced together slowly. Please let me know if you have found anything that could fix it.

Things I've tried:

  • adding height: 100% to my body
  • adding overflow: hidden to my contentFooter
  • adding overflow: hidden!important to my contentFooter

解决方案

I had white space at the bottom of all my websites; this is how I solved the matter:

The first and best thing you can do when you are debugging CSS issues like this is to add:

* { border: 1px solid red; }

This CSS line puts a red box around all your HTML elements.

I had white space at the bottom of my page due to a faulty Chrome extension which was adding the div #dp_swf_engine to the bottom of my page:

<div id="dp_swf_engine" style="position: absolute; width: 1px; height: 1px;"></div>

Without the red box, I would have never noticed a 1px div. I then got rid of the faulty extension, and put display:none on #dp_swf_engine as a secondary measure. (Who knows when it could come back to add random white space at the bottom of my page for all my pages and apps?!)

这篇关于在网站底部的空白处的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆