CSS细胞边缘 [英] CSS Cell Margin

查看:79
本文介绍了CSS细胞边缘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的HTML文档中,我有一个有两列和多行的表。如何使用css增加第一列和第二列之间的空间?我试过应用margin-right:10px;

In my HTML document, I have a table with two columns and multiple rows. How can I increase the space in between the first and second column with css? I've tried applying "margin-right: 10px;" to each of the cells on the left hand side, but to no effect.

推荐答案

将此应用于您的第一个< td>

Apply this to your first <td>:

padding-right:10px;

HTML示例:

HTML example:

<table>
   <tr>
      <td style="padding-right:10px">data</td>
      <td>more data</td>
   </tr>
</table>

这篇关于CSS细胞边缘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆