문제

I want to set a Same Background Color on Multiple tr's. So that each ROW looks separated from the other one.

Please take a look at this Image. I want to perform same:

enter image description here

Check this DEMO:

http://jsfiddle.net/RkVsp/3/

도움이 되었습니까?

해결책

you need to write css for your "table td" and "table" elements. collapsing borders will help you to fix this problem. i updated your fiddle.

CSS:

  table{
 background-color:gray;
  border-collapse:collapse;  
}

table td{
border-top:5px solid #fff;
border-bottom:5px solid #fff;
}

다른 팁

Use CSS with a border-bottom attribute and be sure to set your cell spacing and padding to 0:

td { background-color: #FFC; border-bottom: 1px #FFF solid; }

If you are using Chrome or Firefox and have firebug installed you should be able to right click to 'Inspect Element'. This will show what style is being used.

Have a look at http://getfirebug.com/enable

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top