开发者

How to surround the cells with just one pixel

开发者 https://www.devze.com 2023-02-07 21:24 出处:网络
I have a grid control and I\'m setting a style for it. In the border of cells, I want one pixel around eac开发者_高级运维h cell, but it appears two pixel because one from the left and one from the ri

I have a grid control and I'm setting a style for it. In the border of cells, I want one pixel around eac开发者_高级运维h cell, but it appears two pixel because one from the left and one from the right.

The CSS:

.RadGrid_MyCustomSkin .rgRow td, .RadGrid_MyCustomSkin .rgAltRow td
{
    border: 1px solid #F0D88C;
}

Any help !!


Use the border-collapse property.


give to td and table like this

table, td
{
    border-color: #F0D88C;
    border-style: solid;
}

table
{
    border-width: 0 0 1px 1px;
    border-spacing: 0;
    border-collapse: collapse;
}

td
{
    margin: 0;
    padding: 4px;
    border-width: 1px 1px 0 0;

}


You can set a border for one side only, maybe this will point you in the right direction :)

.RadGrid_MyCustomSkin .rgRow td, .RadGrid_MyCustomSkin .rgAltRow td
{
    border-left/*or -right*/: 1px solid #F0D88C;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消