|
|
|
|
Posted by mikosullivan on July 8, 2004, 5:34 pm
Please log in for more thread options
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?
|
|
Posted by jmm-list-tr on July 9, 2004, 7:08 am
Please log in for more thread options
mikosullivan@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)
|
|
Posted by Brian on July 9, 2004, 9:29 am
Please log in for more thread options mikosullivan@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/
|
|
Posted by Jukka K. Korpela on July 10, 2004, 9:17 pm
Please log in for more thread options
> mikosullivan@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
|
|
Posted by Pierre Goiffon on July 9, 2004, 11:19 am
Please log in for more thread options > 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 ?
|
| Similar Threads | Posted | | Mac/Safari Gamma Problem matching HTML color to GIF color? | April 18, 2006, 1:56 am |
| There is no gap between cells in html table with CELLSPACING greater than zero | August 25, 2004, 11:38 am |
| Is there a way to change the color of the text fields in html? | March 9, 2006, 11:51 am |
| Tradeoffs of setting background-color on html vs. body? | August 19, 2008, 12:41 pm |
HTML: undesired extra space in | November 29, 2005, 10:33 pm |
| Way to have spacing between cells *only*? | March 24, 2005, 9:37 pm |
| img table cells next to each other without a gap possible? | May 26, 2006, 10:27 pm |
| fixed table cells | January 23, 2007, 11:40 pm |
| Table cells change size | March 1, 2005, 9:02 pm |
| Table with 100% width but relative cells? | June 1, 2005, 11:08 am |
|
|
|
|
|