HighDots Forums  

Another simple question..

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Another simple question.. in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve K
 
Posts: n/a

Default Another simple question.. - 02-13-2004 , 02:22 PM






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

Reply With Quote
  #2  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Another simple question.. - 02-13-2004 , 03:08 PM







"Steve K" <smk17 (AT) cornell (DOT) edu> wrote

Quote:
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.



Reply With Quote
  #3  
Old   
David Dorward
 
Posts: n/a

Default Re: Another simple question.. - 02-13-2004 , 03:54 PM



Steve K wrote:
Quote:
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/>


Reply With Quote
  #4  
Old   
David Dorward
 
Posts: n/a

Default Re: Another simple question.. - 02-13-2004 , 03:55 PM



Harlan Messinger wrote:

Quote:
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.

Quote:
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/>


Reply With Quote
  #5  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Another simple question.. - 02-13-2004 , 04:09 PM




"David Dorward" <dorward (AT) yahoo (DOT) com> wrote

Quote:
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.



Reply With Quote
  #6  
Old   
Peter Foti
 
Posts: n/a

Default Re: Another simple question.. - 02-13-2004 , 04:12 PM



"Harlan Messinger" <h.messinger (AT) comcast (DOT) net> wrote

Quote:
"David Dorward" <dorward (AT) yahoo (DOT) com> wrote in message
news:c0jdlc$ij3$5$8302bc10 (AT) news (DOT) 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





Reply With Quote
  #7  
Old   
David Dorward
 
Posts: n/a

Default Re: Another simple question.. - 02-13-2004 , 04:29 PM



Harlan Messinger wrote:

Quote:
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/>


Reply With Quote
  #8  
Old   
David Dorward
 
Posts: n/a

Default Re: Another simple question.. - 02-13-2004 , 04:30 PM



Peter Foti wrote:

Quote:
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/>


Reply With Quote
  #9  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: Another simple question.. - 02-13-2004 , 05:50 PM



Quoth the raven named Steve K:

Quote:
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.


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.