Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 08:17 PM
mikosullivan@gmail.com
Guest
 
Posts: n/a
Default HTML, rules=groups, color of space between cells

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?
  #2  
Old July 20th, 2005, 08:17 PM
jmm-list-tr
Guest
 
Posts: n/a
Default Re: HTML, rules=groups, color of space between cells

mikosullivan@gmail.com wrote:[color=blue]
>
> 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.
>[/color]
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)
  #3  
Old July 20th, 2005, 08:17 PM
Pierre Goiffon
Guest
 
Posts: n/a
Default Re: HTML, rules=groups, color of space between cells

<mikosullivan@gmail.com> a écrit dans le message de
news:de9f736d.0407081534.3ae44ea9@posting.google.c om[color=blue]
> Is there a CSS or HTML setting that indicates the color of the spaces
> between cells in a group?[/color]

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

  #4  
Old July 20th, 2005, 08:18 PM
Brian
Guest
 
Posts: n/a
Default Re: HTML, rules=groups, color of space between cells

mikosullivan@gmail.com wrote:
[color=blue]
> Is there a CSS or HTML setting that indicates the color of the
> spaces between cells in a group?[/color]

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/
  #5  
Old July 20th, 2005, 08:18 PM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: HTML, rules=groups, color of space between cells

Brian <usenet3@julietremblay.com.invalid> wrote:
[color=blue]
> mikosullivan@gmail.com wrote:
>[color=green]
>> Is there a CSS or HTML setting that indicates the color of the spaces
>> between cells in a group?[/color]
>
> Set a background-color for the table, then set border-collapse:
> separate; and border-spacing to whatever you want.[/color]

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

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles