我正在尝试缩小照片下方姓名行中单元格之间的空间。我已经尝试了所有我能找到的东西,但没有运气。谁能告诉我如何让名字在 table 内靠得更近?我做了一个 fiddle here .我正在使用 bootstrap 3。非常感谢
HTML
<div class="container">
<div class="col-xs-12 col-md-6 col-sm-8 col-lg-6 center-block animated fadeInUp">
<div class="results">
<ul id="results">
<!-- results appear here -->
<h3>
Image title
</h3>
<div class="dark">
<a href="page.php?page_id=241"><img src="http://www.fiji.travel/sites/default/files//styles/views-large-thumbnail/public/arial-of-island.jpg?itok=KZHGX6pJ" width="600" class="img-responsive" alt=""></a>
</div>
<small>posted by:
<a href="profile.php?user_id=user_id" span="" class="">
Anderson</a></small>
<!-Make These names sit closer together--->
<table id="myTable2" border="0" cellpadding="0" cellspacing="0" class="table" style="width:auto;">
<tbody>
<tr style="\"display:none;\"">
<td valign="top"><strong><a href="profile.php?user_id=6" class="tags" style="color:">
Anderson,</a> </strong></td>
<td valign="top"><strong><a href="profile.php?user_id=9" class="tags" style="color:#3cb0fd">
James Bond,</a> </strong></td>
<td valign="top"><strong><a href="profile.php?user_id=2" class="tags" style="color:">
Julian,</a> </strong></td>
</tr>
</tbody>
</table>
<hr>
最佳答案
将此添加到您的 CSS:
#myTable2 td {
padding: 0 0;
}
它将删除您想要删除的填充,并且单元格将彼此相邻。
关于html - 如何减少表格单元格之间的空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40921766/