由表格单元格

时间:2016-11-05 00:41:18

标签: html css

我在表格单元格中有链接。表格宽度将是固定的,因此如果元素长于4,链接将会换行,但它们看起来很挤。我尝试应用边距,但看起来没有任何效果。似乎身高:汽车没有考虑到保证金?

这是JSFIDDLE

 table tr td {
    width: 350px;
   border: 1px dotted #999999;
    height: auto;
}


.post-tag  {
    padding: 4px 10px 5px;
    font-size: 14px;
    line-height: 1.3;
    color: #FFF;
    background: #9fa6ad;
    transition: background .15s ease;
    margin:10px;
    }
 a.post-tag:hover {
    color: #FFF;
    background: #f69c55;
}

<table class="table table-striped">
<thead><tr><th></th><th>Left</th><th>Right</th></tr><th></th></thead>
<tbody>
  <tr><td>INK</td><td><a  class="post-tag" href="#">798798981 - a </a><a class="post-tag" href="#">154981 - a </a><a  class="post-tag" href="#">798798981 - a </a></td><td>INK</td><td><a class="post-tag" href="#">154981 - a </a><a  class="post-tag" href="#">798798981 - a </a></td><td></td></tr>


  <tr><td>INK</td><td><a class="post-tag" href="#">154981 - a </a><a  class="post-tag" href="#">798798981 - a </a><a class="post-tag" href="#">154981 - a </a><a  class="post-tag" href="#">798798981 - a </a></td><td>INK</td><td><a class="post-tag" href="#">154981 - a </a><a  class="post-tag" href="#">798798981 - a </a></td><td></td></tr>



</tbody>
</table>

0 个答案:

没有答案