Aaron Gray wrote:
> Hi,
>
> I am having problems with tables, basically I want to do all formatting in 
> CSS but am having problems knowing how to do "cellspacing" and "cellpadding" 
> table attributes in CSS.
>
> At the moment I have :-
>
>     table {
>         border: 1px solid black;
>         }
>     td  {
>         border: 1px solid black;
>         }
>     th  {
>         border: 1px solid black;
>         }
>
> and
>
>     <table cellspacing="0" cellpadding="2">
>         ...
>     </table>
>
> How do I do this all in CSS ?
>   
    Try this...
table,
th,
td {
  border: 1px solid black;
}
table {
  border-collapse: collapse;
}
th,
td {
  padding: 2px;
}

    In IE, though, cellspacing has priority over border-collapse / 
border-spacing (so don't use it).

    Rafael

Ref.: http://www.w3.org/TR/REC-CSS2/tables.html#borders
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to