[英]Width table column bootstrap 3.3 with button
我在模板中得到了带有“查看”按钮的下表。php。 我使用引导程序 3.3.7
<?php
if($num>0){
echo "<table class='table table-responsive table-sm table-hover table-bordered'>";
echo "<thead>";
echo "<tr>";
echo "<th>Name</th>";
echo "<th>Description</th>";
echo "<th></th>";
echo "</tr>";
echo "</thead>";
echo "<tbody>";
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
extract($row);
echo "<tr>";
echo "<td>{$name}</td>";
echo "<td>{$description}</td>";
echo "<td>";
echo "<a href='view_thing.php?id={$id}' class='btn-info btn-sm'>";
echo "<span class='glyphicon glyphicon-eye-open'></span> View";
echo "</a>";
echo "</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
?>
它看起来像:表测试 1
我尝试了什么:
<th class="col-md-1"></th>
<th style="width: 10%"></th>
它应该做什么:
最后一列应适合按钮大小。
解决方案:
echo <th style=width: '10%'></th>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.