为什么我的div没有出现?

时间:2017-10-08 10:57:37

标签: html css

我所要做的只是显示和广告div,但无论我做什么,它似乎都没有出现。所以这是我的HTML,显示问题的div是:

  

广告容器

@import url('https://fonts.googleapis.com/css?family=Roboto');
body {
  background-color: #343741;
  margin: 0;
  font-family: 'Roboto', sans-serif;
}

.navbar-container {
  width: 17%;
  position: fixed;
  float: left;
}

.logo-container {
  text-align: center;
  background-color: #2A2D35;
  padding: 3% 0 3% 0;
}

.link-container {
  display: block;
  margin-top: 3px;
  padding: 15px 0 15px 0;
  background-color: #2A2D35;
  width: 100%;
}

.nav-link {
  text-decoration: none;
  color: #CECECE;
  border-left: 0 solid #F8A900;
  width: 90%;
  display: block;
  padding-left: 15%;
  padding: 5% 0 5% 20px;
}

.alert-container {
  margin-top: 3px;
  background-color: #24262D;
  color: #fff;
  text-align: center;
  padding: 5% 0 3% 0;
}

.topbar-container {
  position: fixed;
  float: right;
  right: 0;
  background-color: #2A2D35;
  width: 82.86%;
  color: #7A828A;
  padding: 1.7% 0 1.6% 0;
}

.user-content {
  margin-left: 90%;
}

.alert-title {
  color: #F8A900;
}

.advert-container {
  position: absolute;
  bottom: 10%;
  width: 30%;
  overflow: auto;
}

#space {
  padding-top: 10px;
}

.entire {
  width: 100%;
}
<!DOCTYPE html>
<html lang="en">

<head>
  <title>Dashboard</title>
  <link rel="stylesheet" type="text/css" href="css/dashboard.css">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <script type="text/javascript" src="js/jquery-1.9.1.js"></script>
  <script type="text/javascript" src="js/jquery-ui.js"></script>
  <script type="text/javascript" src="js/dashboard.js"></script>
</head>

<body>
  <div class="entire">
    <div class="topbar-container">
      <div class="user-content">
        <?php
    				echo htmlspecialchars($_SESSION['username']);
    				?>

      </div>
    </div>
    <div class="navbar-container">
      <div class="logo-container">
        <img src="/images/logo.png" width="30%">
      </div>
      <div class="link-container">
        <a href="#" class="nav-link">Dashboard</a>
        <div id="space"></div>
        <a href="#" class="nav-link">Attack Panel</a>
        <div id="space"></div>
        <a href="#" class="nav-link">Payment</a>
        <div id="space"></div>
        <a href="#" class="nav-link">T.O.S</a>
        <div id="space"></div>
      </div>
      <div class="alert-container">
        <img src="/images/alert.png" width="10%">
        <p class="alert-title">Recent Attacks</p>
      </div>
    </div>
    <div class="advert-container">
      <img src="/images/adslot.png" width="30%"> test
    </div>
  </div>
</body>

</html>

我试图改变某些元素的位置类型并添加和溢出到div但这似乎仍然没有效果。我完全难过了。

0 个答案:

没有答案