我很抱歉。这是我的错。我使用的bootstrap css和sb-admin css是错误的。我用SB-admin使用的相同bootstrap css替换它。顺便说一下。!!
我的桌子不适合我的容器液体。在右侧,工作台通过容器 - 液体 - 不适合容器。
这是我的代码:
<body>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="dashboard.php">Selamat Datang Administrator</a>
</div>
<ul class="nav navbar-right top-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <?php echo $_SESSION["username"] ?> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="#"><i class="fa fa-fw fa-user"></i> Profile</a>
</li>
<li>
<a href="#"><i class="fa fa-fw fa-envelope"></i> Inbox</a>
</li>
<li>
<a href="#"><i class="fa fa-fw fa-gear"></i> Settings</a>
</li>
<li class="divider"></li>
<li>
<a href="logout.php"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
</li>
</ul>
</li>
</ul>
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav">
<li>
<a href="dashboard.php"><i class="fa fa-fw fa-dashboard"></i> Beranda</a>
</li>
<li class="active">
<a href="lapangan.php"><i class="fa fa-fw fa-edit"></i> Lapangan</a>
</li>
<li>
<a href="jadwal.php"><i class="fa fa-fw fa-table"></i> Jadwal</a>
</li>
<li>
<a href="riwayat.php"><i class="fa fa-fw fa-bar-chart-o"></i> Riwayat</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</nav>
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
Lapangan
</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Deskripsi</th>
<th>Alamat</th>
<th>No-Telp</th>
<th>Jam Buka</th>
<th>Jam Tutup</th>
<th>Jumlah Sub Lapangan</th>
<th>Gambar</th>
<th>Pilihan</th>
</tr>
</thead>
<tbody>
<?php
$count = 1;
$tampil = mysql_query("SELECT * FROM lapangan ORDER BY id_lapangan");
while ($record = mysql_fetch_array($tampil)) {
$SQL = "SELECT * FROM gambar WHERE id_lapangan = " . $record['id_lapangan'] . ";";
$res = mysql_query($SQL, $link);
$img = '<table><tr>';
if (mysql_num_rows($res)) {
while ($row = mysql_fetch_array($res)) {
$img .= "<td><img src='" . $row['path'] . "' class='thumbnail imgTbl'/></td>";
}
} else {
$img = "<td><img src='gallery/no-image.png' class='thumbnail'><td>";
}
$img .= '</tr></table>';
echo "<tr>";
echo "<td>" . $count . " </td>
<td>" . $record['nama'] . " </td>
<td style='width: 10px;'>" . $record['deskripsi'] . " </td>
<td>" . $record['alamat'] . " </td>
<td>" . $record['no_telp'] . " </td>
<td>" . $record['jam_buka'] . " </td>
<td>" . $record['jam_tutup'] . " </td>
<td>" . $record['jum_sub_lapangan'] . " </td>
<td>$img</td>
<td> <a href='lapanganUbah.php?id_lapangan=" . $record['id_lapangan'] . "' class='btn btn-success fa fa-pencil'></a>
<a onClick=\"javascript: return confirm('Peringatan!!\\nAnda akan menghapus lapangan " . $record['nama'] . "\\nApakah anda yakin?');\"
href='lapangan.php?id_lapangan=" . $record['id_lapangan'] . "' class='btn btn-danger fa fa-trash-o'></a>
</td>";
echo"</tr>";
$count++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
这是css。它的模板SB-admin。
body {
margin-top: 100px;
background-color: #222;
}
@media(min-width:768px) {
body {
margin-top: 50px;
}
}
#wrapper {
padding-left: 0;
}
#page-wrapper {
width: 100%;
padding: 0;
background-color: #fff;
}
@media(min-width:768px) {
#wrapper {
padding-left: 225px;
}
#page-wrapper {
padding: 10px;
}
}
有人能帮帮我吗?我非常赞赏它。