白条顶部的html(没有边距)

时间:2018-05-15 15:27:31

标签: html css



.banner{
  background-color: #7fffd4;
  color: white;
  font-family: Apple Chancery, cursive;
  margin: 0;
  padding: .1%;
  width: 100%;
  font-size: 14px;
}

body{
  margin: 0;
}

.container {
   position: relative;
}
.rect{
    width:100%;
    height:599px;
    position: absolute;
    margin: 0;
    background:#aa7fff;

}

.left{
  width: 25%;
  padding-left: 2%;
  font-family: Apple Chancery, cursive;
  color: white;
}

<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
  <meta charset="utf-8">
  <title>EmeryForAmerica</title>
  <link rel="stylesheet" type="text/css" href="main.css">
</head>

<body>

  <div class="banner">
    <h1>
        <center>""</center>
    </h1>
  </div>

  <div class="rect">
    <div class="left">
      <h1> "America has problems, and in order to solve those problems, we need to make America not have problems anymore..."</h1>
      <br>
      <h2> -Emery</h2>
    </div>
  </div>



  </div>
  <div class="container">
    <center><img src="EliBinky.jpg" height="full" width="full"></center>
  </div>
  </div>



</body>

</html>
&#13;
&#13;
&#13;

我知道它看起来很糟糕,而且图像缺失,但是,答案如&#34; Removing white bar from top of page&#34;建议使用边距和填充0.如果我在横幅上执行此操作,则会添加白条。目前,条形图已经消失,因为有填充(甚至.1%),这将删除条形。这个解决方案不可行,因为我需要0填充以保证页面其余部分的完整性。请帮忙。

0 个答案:

没有答案