在单元格之间有间距*的方法*? [英] Way to have spacing between cells *only*?

查看:74
本文介绍了在单元格之间有间距*的方法*?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能在一个表格的'b
单元格之间,而且只在单元格之间,而不是在外部单元格和
表'的边框。请参阅消息末尾的示例(确保以

固定宽度字体查看)。


我玩过不同的东西,比如作为保证金权利等,但我没有得到任何结果。
没有得到任何结果。这有可能吗?我原以为

规格(HTML或CSS)会允许这样的东西...

我错了吗?


Thx。


+ ---------------------------- +

| ====== ====== ====== |

| || || || || || || |

| || || || || ^ || || | < - 桌边

| ====== ====== | ====== |

| < - | -------- + ------单元格间距

| |

| ====== ====== ====== |

| || || || || || || < ----没有额外的

| || || || || || || |间距

| ====== ====== ====== |细胞和桌子边框

+ ---------------------------- +

I''m wondering if it''s at all possible to have spacing between a table''s
cells, and only between the cells, not between the outter cells and the
table''s border. See end of message for an example (make sure to view this in
fixed width font).

I''ve played around with different things, such as margin-right, etc. but I
didn''t get any results. Would this be even possible. I would have thought
the specs (either HTML or CSS) would have allowed for something like this...
Am I wrong?

Thx.

+----------------------------+
| ====== ====== ====== |
| || || || || || || |
| || || || || ^ || || | <- table border
| ====== ====== | ====== |
| <-|--------+------ cell spacing
| |
| ====== ====== ====== |
| || || || || || || <---- no extra
| || || || || || || | spacing between
| ====== ====== ====== | cell and table border
+----------------------------+

推荐答案

" Sebastien B." < SE ******* @ nospam.nospam>在消息中写道

news:xP ******************** @ rogers.com ...
"Sebastien B." <se*******@nospam.nospam> wrote in message
news:xP********************@rogers.com...
I我想知道是否有可能在桌子的单元格之间留出间距,而且只在单元格之间,而不是在外部单元格和
表格的边界之间。请参阅消息的结尾以获取示例(确保以固定宽度字体查看此
)。

我已经玩过不同的东西,例如margin-right等等但是我没有得到任何结果。这有可能吗?我原以为
规格(HTML或CSS)会允许类似
这样的东西......我错了吗?

Thx。

+ ---------------------------- +
| ====== ====== ====== |
| || || || || || || |
| || || || || ^ || || | < - 桌边
| ====== ====== | ====== |
| < - | -------- + ------单元格间距
| |
| ====== ====== ====== |
| || || || || || || < ----没有额外的
| || || || || || || |间距
| ====== ====== ====== |细胞和桌子边框
+ ---------------------------- +
I''m wondering if it''s at all possible to have spacing between a table''s
cells, and only between the cells, not between the outter cells and the
table''s border. See end of message for an example (make sure to view this in fixed width font).

I''ve played around with different things, such as margin-right, etc. but I
didn''t get any results. Would this be even possible. I would have thought
the specs (either HTML or CSS) would have allowed for something like this... Am I wrong?

Thx.

+----------------------------+
| ====== ====== ====== |
| || || || || || || |
| || || || || ^ || || | <- table border
| ====== ====== | ====== |
| <-|--------+------ cell spacing
| |
| ====== ====== ====== |
| || || || || || || <---- no extra
| || || || || || || | spacing between
| ====== ====== ====== | cell and table border
+----------------------------+




我好奇,你为什么要这样做?请参阅下面的可能解决方案。

签名,




< html>

< head>

< title> Untitled Document< / title>

< meta http-equiv =" Content-Type"含量=" text / html的; charset = iso-8859-1">

< style type =" text / css">

<! -

..cellspacerightbottom {padding-right:10px; padding-bottom:10px}

- >

< / style>

< / head>


< body bgcolor =" #FFFFFF">

< table width =" 100%"边界=" 1 QUOT; CELLSPACING = QUOT; 0" cellpadding =" 0">

< tr>

< td class =" cellspacerightbottom"> stuff< / td>

< td> stuff< / td>

< / tr>

< tr>

< td> stuff< / td>

< td> stuff< / td>

< / tr>

< / table>

< / body>

< / html>



I''m curious, why do you want to do this? See below for a possible solution.
Signed,
me

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
..cellspacerightbottom { padding-right: 10px; padding-bottom: 10px}
-->
</style>
</head>

<body bgcolor="#FFFFFF">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td class="cellspacerightbottom">stuff</td>
<td>stuff</td>
</tr>
<tr>
<td>stuff</td>
<td>stuff</td>
</tr>
</table>
</body>
</html>


Sebastien B.写道:
Sebastien B. wrote:
我想知道是否有可能在表格的单元格之间留出间距,而且只在单元格之间,而不是在外部单元格和
表格的边界之间。有关示例,请参阅消息的结尾(确保以
固定宽度字体查看)。

我玩过不同的东西,例如margin-right等等但是我没有得到任何结果。这有可能吗?我原以为
规格(HTML或CSS)会允许这样的东西...
我错了吗?

Thx。

+ ---------------------------- +
| ====== ====== ====== |
| || || || || || || |
| || || || || ^ || || | < - 桌边
| ====== ====== | ====== |
| < - | -------- + ------单元格间距
| |
| ====== ====== ====== |
| || || || || || || < ----没有额外的
| || || || || || || |间距
| ====== ====== ====== |细胞和桌子边框
+ ---------------------------- +
I''m wondering if it''s at all possible to have spacing between a table''s
cells, and only between the cells, not between the outter cells and the
table''s border. See end of message for an example (make sure to view this in
fixed width font).

I''ve played around with different things, such as margin-right, etc. but I
didn''t get any results. Would this be even possible. I would have thought
the specs (either HTML or CSS) would have allowed for something like this...
Am I wrong?

Thx.

+----------------------------+
| ====== ====== ====== |
| || || || || || || |
| || || || || ^ || || | <- table border
| ====== ====== | ====== |
| <-|--------+------ cell spacing
| |
| ====== ====== ====== |
| || || || || || || <---- no extra
| || || || || || || | spacing between
| ====== ====== ====== | cell and table border
+----------------------------+



如果应用于表格单元格,HTML中的
''cellpadding''和''cellspacing''可以在CSS中替换为

''padding''和''margin''。请参阅:
http:// www.w3.org/TR/REC-CSS2/box.html#box-dimensions

进一步增强是''border-spacing'',其中长度指定

分隔相邻单元格边框的距离。请参阅:
http: //www.w3.org/TR/REC-CSS2/tables...border-spacing

-

Gus



''cellpadding'' and ''cellspacing'' in HTML are replaceable in CSS with
''padding'' and ''margin'' respectively, if applied to table cells. See:
http://www.w3.org/TR/REC-CSS2/box.html#box-dimensions
A further enhancement is ''border-spacing'', where the lengths specify the
distance that separates adjacent cell borders. See:
http://www.w3.org/TR/REC-CSS2/tables...border-spacing

--
Gus


" Sebastien B." < SE ******* @ nospam.nospam>写道:
"Sebastien B." <se*******@nospam.nospam> wrote:
我想知道是否有可能在表格的单元格之间有间距,而且只在单元格之间,而不是outter cell和
table的边框。
I''m wondering if it''s at all possible to have spacing between a table''s
cells, and only between the cells, not between the outter cells and the
table''s border.




不可能。


-

Spartanicus



Not possible.

--
Spartanicus


这篇关于在单元格之间有间距*的方法*?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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