Previous Message
Next Message

css equivalent for this table code?

Sent by Dave Silvester on 25 May 2004 00:12


On Tuesday 25 May 2004 00:01, Francesco wrote:
> What is the CSS equivalent for this?
>
> <table border="1" cellpadding="5" cellspacing="0">
> <tr><td></td></tr>
> </table>

You are using the table for tabular data, not layout, right?  ;-)

"margin" is equivalent to cellspacing.
"padding" is equivalent to cellpadding.
"border-collapse" stops double borders appearing where you only want one.

In your case, something like this will do it:

table {
  border: 1px solid #000000;
  margin: 10px; /* Leave some space around the outside of the table */
  padding: 0; /* No padding inside the table */
  border-collapse: collapse; /* Collapse borders together */
}

td {
  border: 1px solid #000000;
  margin: 0; /* No gap between the cells */
  padding: 5px; /* Padding inside the cells */
}

Hope that helps!  :-)

~Dave

-- 

Dave Silvester
Music Technology Junkie
Web: http://www.mu-sly.co.uk/
Email: sly at mu hyphen sly dot co dot uk
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: