How to surround the cells with just one pixel
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;
}
精彩评论