【发布时间】:2013-08-08 16:42:36
【问题描述】:
我有一个只有一个模板字段的网格视图,我希望行的距离为 5-10 像素。 我尝试在 item-style-css 上设置边距,但不起作用。 唯一似乎修改距离的是边框,但我需要边框来实现 hoover 效果,这是 css ot 模板字段项样式:
.event_home
{
border: double;
border-width: 1px;
border-color: #581017;
background-image:url('../images/t_off.png');
cursor:pointer;
}
.event_home:hover
{
border: double;
border-width: 1px;
border-color: #C5CC19;
}
我展示了我的示例,gridview 的每一行只有一个单元格,我希望将这些行分开,以便我可以看到两行之间的页面背景。 图A是我现在拥有的,图B是我想要的:
Fig A
+---+
| A |
+---+
| B |
+---+
| C |
+---+
Fig.B
+---+
| A |
+---+
<-- this is margin of N pixel
+---+
| B |
+---+
+---+
| C |
+---+
【问题讨论】:
-
我听不懂你的问题。请清楚
-
尝试在网格视图中添加单元格间距,例如 CellSpacing="20"
标签: html asp.net css web-applications