表格显示在侧边栏导航下

时间:2017-11-17 15:02:38

标签: html css bootstrap-4

我试图制作一张桌子,但桌子在我的侧边栏下面滑动,即使我点击侧边栏下方的折叠也是如此。

真的很烦人

我试图让桌子尺寸稍小但仍然相同

enter image description here

enter image description here

我的代码:

<table class="table table-bordered table-hover table-striped">
<thead class="thead-inversed">
<tr>
<th> Steam id</th>
<th>User role</th>
<th>Steam name</th>
<th>Real name</th>
<th>avatar</th>
<th>Register date</th>
<th>make admin</th>
<th>user</th>
<th>ban</th>
</tr>
</thead>
<tbody>


<?php

$query = "SELECT * FROM  users ";
$select_users= mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($select_users)) {
$steam_id= $row['steamnid'];
$steam_userrole= $row['user_role'];
$name= $row['steamname'];
$real= $row['steamreal'];
$avatar= $row['steam_avatar'];
$register_Date =  $row['user_logindate'];




    echo "<tr>";
    echo "<td>{$steam_id}</td>";
    if($steam_userrole == 'admin') {

  echo "<td><span class='badge badge-info'>{$steam_userrole}</span></td>";

}else {
  echo "<td><span class='badge badge-info'>{$steam_userrole}</span></td>";


}

    echo "<td>{$name}</td>";
    echo "<td>{$real}</td>";
    echo "<td><img src='{$avatar}'></td>";
         echo "<td>{$register_Date}</td>";



echo "<td><a href='./users.php?change_to_admin=$steam_id'>Admin</a></td>";
echo "<td><a href='./users.php?change_to_user=$steam_id'>User</a></td>";
echo "<td><a href='./users.php?Ban={$steam_id}'>Ban</a></td>";



    echo "</tr>";

       }
?>



</tbody>
</table>

侧边栏代码:

<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
  <a class="navbar-brand" href="index.html">test</a>
  <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse" id="navbarResponsive">
    <ul class="navbar-nav navbar-sidenav" id="exampleAccordion">
      <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Dashboard">
        <a class="nav-link" href="index.html">
          <i class="fa fa-fw fa-dashboard"></i>
          <span class="nav-link-text">Dashboard</span>
        </a>
      </li>



      <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Menu Levels">
        <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseMulti" data-parent="#exampleAccordion">
          <i class="fa fa-fw fa-sitemap"></i>
          <span class="nav-link-text">Sites</span>
        </a>
        <ul class="sidenav-second-level collapse" id="collapseMulti">
          <li>
            <a href="#">All Sites</a>
          </li>
          <li>
            <a href="#">Add Site</a>
          </li>

          <li>

          </li>

        </ul>

      </li>
      <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Charts">
        <a class="nav-link" href="users.php?source=show">
          <i class="fa fa-user-circle-o"></i>
          <span class="nav-link-text">Users</span>
        </a>
      </li>

      <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Charts">
        <a class="nav-link" href="categories.php">
          <i class="fa fa-tags"></i>
          <span class="nav-link-text">Categories</span>
        </a>
      </li>

    </ul>

    <ul class="navbar-nav sidenav-toggler">
      <li class="nav-item">
        <a class="nav-link text-center" id="sidenavToggler">
          <i class="fa fa-fw fa-angle-left"></i>
        </a>
      </li>

    </ul>
    <ul class="navbar-nav ml-auto">


      <li class="nav-item">
        <li>
            <!-- Logoutshit -->
        </li>
      </li>
    </ul>
  </div>
</nav>

我正在使用sb admin template bootstrap 4.

我试图把它拉得正确但不行。

有什么想法吗?

0 个答案:

没有答案