Table cellpadding / cellspacing using css

Print

Normally, using html only, we set the cellpadding and cellspacing of the table in this way:

<table cellspacing="0" cellpadding="0">

To do the same in css, we need to use the following:

table {

border-spacing: 0;
border-collapse: collapse;
}

table td {

padding: 0;

}

This will give the same affect to the table, using purely css.

Last Updated ( Thursday, 22 January 2009 02:33 )