i have table has both border-spacing , zebra striping. when border-spacing , zebra striping combined, combination results in gaps between columns rather smooth stripe. example, in table below there unsightly gap between peach , yes.
how can keep border-spacing, remove gaps in zebra stripes?
fiddle: http://jsfiddle.net/bridgeland/xcbr9/
css:
table { border-spacing: 15px; } tr:nth-child(even) { background-color: #c4d8fd; }
how this? updated jsfiddle
table { border-collapse:collapse; } table td { padding:10px 0; } tr:nth-child(even) { background-color: #c4d8fd; }
set padding
on table cells, , use border-collapse:collapse
on table remove border.
Comments
Post a Comment