如何摆脱我网站上的空白区域?

时间:2015-05-26 19:14:13

标签: php html css

我的网站存在问题,在我的网站的所有网页上都有一个白色的间隙。这是我的index.php页面:

body {
  vertical-align: middle;
  margin: 0;
  background: url(flame_bg.png) no-repeat left top;
}
#bg_container {
  height: 500px;
  overflow: hidden;
}
#bg {
  width: 100%;
}
#content {
  position: relative;
  top: 0;
  padding: 60px;
  vertical-align: middle;
}
#content2 {
  position: inherit;
  top: 10px;
  padding: 60px;
  vertical-align: top;
}
<div id="content">
  <p>&nbsp;</p>

  <p>&nbsp;</p>

  <p>&nbsp;</p>
  <h1><span style="font-size:36px; color: #fd4000; font-family: 'Tahoma', Geneva, sans-serif;">Welcome, to Burning Chat</span></h1>

  <p><span style="font-size:24px; color=#fd4000; font-family: 'Tahoma', Geneva, sans-serif;">Whether you&#39;re browsing for a friend, or wanting to improve your business&#39; audience.</span>
  </p>

  <p><span style="font-size:24px; color=#fd4000; font-family: 'Tahoma', Geneva, sans-serif;">Burning Chat provides you with a sociable expierence to connect with your close ones wherever you are, and its free.</span>
  </p>
</div>


<div id="pageMiddle">&nbsp;</div>
<div id="pageBottom">&copy;2015 Burning Flame</div>

您可以在此处查看问题:www.burningchat.tk

我还要求<p>&nbsp;</p>降低页面上的文字。

2 个答案:

答案 0 :(得分:0)

您为#content#content2 padding:60px;提供了帮助。这意味着在这些容器周围,您可以创建60px的空白。这是你的意思吗?

除此之外,你的HTML非常可见。不再有任何标记<font>,更不用说<font-family>,这些标记在一个世纪前已被弃用。请改用相应的CSS属性:

h1 {
    color: #fd4000;
    font-family: "Tahoma", Geneva, sans-serif;
}

答案 1 :(得分:0)

检查完dom之后,看起来#pageMiddle的高度为1000px。

样式表中的

提供:

#pageMiddle{
  height:0;
}

应该做的伎俩。

相关问题