Table styled with css so it has a border around the outside and a clean border on the inner cells

This table is styled so that there is a border around the outside of the table and a border around each cell - without seeing a double line on the inner cells.

Empty Cell
Styles used: Empty cell

 

.maintable {
margin: auto auto;
border-collapse: collapse; /*this is what stops the double border appearing on cells*/
border: 1px solid black;
}


.maintable td{
border: 1px solid black;
background-color:#CCCC99;

Another empty cell

Back to the tutorials page