By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,625 Members | 2,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,625 IT Pros & Developers. It's quick & easy.

HTML, rules=groups, color of space between cells

P: n/a
OK, so, say you've got a table, and it's set up like the following
code. Note the rules="groups" part and the
background-color:lime part.

<table rules="groups" cellpadding="8" cellspacing="8">
<thead style="background-color:lime;">
<tr>
<th>Total value</th>
<th>In lien</th>
</tr>

<tr>
<th>Total value of all of asset(s)</th>
<th>Is this asset in lien?</th>
</tr>
</thead>
</table>

Now, the way this code gets rendered (at least in IE, which is what my
users use) is that the cells have a lime background, but the space
*between* the cells is the same as the BODY background color (white in
my case). See http://www.idocs.com/miko/uf/pics/finances.gif for a
screenshot of what I mean.

Is there a CSS or HTML setting that indicates the color of the spaces
between cells in a group? I've usually kludged this with
cellspacing="0", but for this one page I really like those nice thick
borders.

Anybody? Anybody? Bueller?
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
mi**********@gmail.com wrote:

Is there a CSS or HTML setting that indicates the color of the spaces
between cells in a group? I've usually kludged this with
cellspacing="0", but for this one page I really like those nice thick
borders.

Set <table border"0" cellspacing="2" or 5 or whatever>. The color
showing between cells is the body background color.

--
jmm dash list at sohnen-moe dot com
(Remove .TRSPAMTR for email)
Jul 20 '05 #2

P: n/a
<mi**********@gmail.com> a écrit dans le message de
news:de**************************@posting.google.c om
Is there a CSS or HTML setting that indicates the color of the spaces
between cells in a group?


Isn't the border color that is used for that ?

Jul 20 '05 #3

P: n/a
mi**********@gmail.com wrote:
Is there a CSS or HTML setting that indicates the color of the
spaces between cells in a group?


Set a background-color for the table, then set border-collapse:
separate; and border-spacing to whatever you want.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #4

P: n/a
Brian <us*****@julietremblay.com.invalid> wrote:
mi**********@gmail.com wrote:
Is there a CSS or HTML setting that indicates the color of the spaces
between cells in a group?


Set a background-color for the table, then set border-collapse:
separate; and border-spacing to whatever you want.


You could also use <table bgcolor="..."> instead of the CSS property; I'm
not saying you should, just mentioning an HTML answer since this is an
HTML group. Generally, there's not much practical difference between
setting such colors using presentational HTML attributes and setting them
in CSS, but it's probably a good idea to choose _one_ of the approaches.
That is, if you set e.g. cell background colors in HTML, use HTML for the
table background color too.

But I guess Miko (is it really you Miko? long time no see) might have
been asking whether it is possible to set one color for the spaces
between cells in one group (say, for header cells inside <thead>) and
another color for the spaces between cells elsewhere in the table. I'm
afraid this is not possible (except in the sense that you could simulate
it using tricky nested tables), since the spacing between cells "belongs"
to the <table> element, not to any inner element (including <thead>). One
might say that e.g. a table row consists of the cells only, not of the
spacing between them, so that physically a row is non-contiguous in this
sense (if the spacing is nonzero). Similarly, you cannot set the amount
of spacing between cells different for different parts of the table (but
you might achieve the desired effect by using padding instead).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.