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

Another simple question..

P: n/a
Hi,

You helped get the bottom border on the td cells for me, but now there
is a tiny gap in between each cell on this border.

How do I get rid of that?

http://marketingpwt.aem.cornell.edu/members.htm

Thanks again. This page is still in the design phase.
Steve
Jul 20 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a

"Steve K" <sm***@cornell.edu> wrote in message
news:sm*************************@newsstand.cit.cor nell.edu...
Hi,

You helped get the bottom border on the td cells for me, but now there
is a tiny gap in between each cell on this border.

How do I get rid of that?

http://marketingpwt.aem.cornell.edu/members.htm


I find it goes away if I put cellspacing="0" in the <table> tag, though you
shouldn't have to do that. However, setting padding and margins to 0 in the
style has no effect, nor does explicitly setting left and right borders on
the cells to "none". So I'm puzzled too.

Jul 20 '05 #2

P: n/a
Steve K wrote:
You helped get the bottom border on the td cells for me, but now there
is a tiny gap in between each cell on this border. How do I get rid of that?


table { border-collapse: collapse; }

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #3

P: n/a
Harlan Messinger wrote:
However, setting padding and margins to 0 in the style has no effect,
Becuase padding is INSIDE the borders and table cells don't have margins.
nor
does explicitly setting left and right borders on the cells to "none".


Becuase space between borders isn't a border.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #4

P: n/a

"David Dorward" <do*****@yahoo.com> wrote in message
news:c0*******************@news.demon.co.uk...
Harlan Messinger wrote:
However, setting padding and margins to 0 in the style has no effect,


Becuase padding is INSIDE the borders and table cells don't have margins.
nor
does explicitly setting left and right borders on the cells to "none".


Becuase space between borders isn't a border.


Well, beyond margin, padding, and a border in any one direction, there
aren't, as far as I know, any other components to a box's dimensions to
consider! Yet cellspacing="0" does make the gap go away, so what is
cellspacing as distinct from CSS margins, padding, or border? And this isn't
an IE quirk--the identical situation exists in Firebird.

Jul 20 '05 #5

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote in message
news:c0*************@ID-114100.news.uni-berlin.de...

"David Dorward" <do*****@yahoo.com> wrote in message
news:c0*******************@news.demon.co.uk...
Harlan Messinger wrote:
However, setting padding and margins to 0 in the style has no effect,
Becuase padding is INSIDE the borders and table cells don't have margins.
nor
does explicitly setting left and right borders on the cells to
"none".
Becuase space between borders isn't a border.


Well, beyond margin, padding, and a border in any one direction, there
aren't, as far as I know, any other components to a box's dimensions to
consider! Yet cellspacing="0" does make the gap go away, so what is
cellspacing as distinct from CSS margins, padding, or border? And this

isn't an IE quirk--the identical situation exists in Firebird.


I remember reading an Eric Meyers book a while back that specifically
mentioned there was no CSS equivalent to cellspacing. I don't remember the
details of it, but I do remember that he recommended keeping
cellspacing="0".

Regards,
Peter Foti

Jul 20 '05 #6

P: n/a
Harlan Messinger wrote:
Well, beyond margin, padding, and a border in any one direction, there
aren't, as far as I know, any other components to a box's dimensions to
consider! Yet cellspacing="0" does make the gap go away, so what is
cellspacing as distinct from CSS margins, padding, or border?


Its to do with the grid layout of a table.

Take the following example:

....
<tr><td class="a">a</td><td class="b">b</td><td class="c">c</td></tr>
<tr><td class="d">d</td><td class="e">e</td><td class="f">f</td></tr>
<tr><td class="g">a</td><td class="g">a</td><td class="g">a</td></tr>

Then if we had:

..e { margin: 100px; }
..b { margin: 0px; }

The grid would fall apart.

Hence: border-collapse and border-spacing.

http://www.w3.org/TR/CSS2/tables.html

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #7

P: n/a
Peter Foti wrote:
I remember reading an Eric Meyers book a while back that specifically
mentioned there was no CSS equivalent to cellspacing. I don't remember
the details of it, but I do remember that he recommended keeping
cellspacing="0".


Either wrong or just out of date (maybe Eric[1], maybe your memory).

border-spacing and border-collapse (although MSIE doesn't support
border-spacing yet).

http://www.w3.org/TR/CSS2/tables.html

[1] Unlikely to be wrong about this, which leaves 3 options :)
--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #8

P: n/a
Quoth the raven named Steve K:
Hi,

You helped get the bottom border on the td cells for me, but now there
is a tiny gap in between each cell on this border.

How do I get rid of that?

http://marketingpwt.aem.cornell.edu/members.htm


After all the conversation about borders and collapse and stuff, I
remember an old hack I've seen. Drop the vertical padding and insert
one of these between each real row.

<tr><td><hr></td></tr>

As I said, a hack... <g> Nice page, btw.

--
-bts
-This space intentionally left blank.
Jul 20 '05 #9

P: n/a
Harlan Messinger wrote:
"Steve K" <sm***@cornell.edu> wrote ...

there is a tiny gap in between each cell on this border.

http://marketingpwt.aem.cornell.edu/members.htm


I find it goes away if I put cellspacing="0" in the <table> tag,
though you shouldn't have to do that.


You will if you want to support IE5/Mac.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #10

P: n/a
David Dorward wrote:
Peter Foti wrote:
I remember reading an Eric Meyers book a while back that
specifically mentioned there was no CSS equivalent to
cellspacing. I don't remember the details of it, but I do
remember that he recommended keeping cellspacing="0".


Either wrong or just out of date


Or to support IE5/Mac.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.