HTML and CSS Reference
The double dotted lines are giving Tony's table a busy and distracting look.
It would be much better, and wouldn't detract from the table, if we could
just have one border around each table cell. Can you think of a way to do
that with styling given what you've just learned? Give it a try and check
your answer in the back of the chapter.
Q: You said border spacing is defined
for the entire table, so I can't set a margin
for an individual table cell?
A: Right. Table cells don't have margins;
what they have is spacing around their
borders, and this spacing is set for the entire
table. You can't control the border spacing of
each table cell separately.
Q: Well, is there any way to have
different border spacing on the vertical
than I have on the horizontal? That seems
A: You sure can. You can specify your
border spacing like this:
Q: The border-spacing property
doesn't seem to work in my browser.
A: Are you using an old version of
Internet Explorer? We're sorry to report that
IE version 6 doesn't support border-spacing.
But seriously, isn't it time you upgraded your
border-spacing: 10px 30px;
That sets 10 pixels of horizontal border
space and 30 pixels of vertical border space.