On Sun, 30 Apr 2006 11:08:12 +0100 Steve Pugh <st***@pugh.net> wrote:
|
ph**************@ipal.net wrote:
|
|>On Sat, 29 Apr 2006 13:06:13 +0100 Steve Pugh <st***@pugh.net> wrote:
|>| Stan Brown <th************@fastmail.fm> wrote:
|>|
|>|>28 Apr 2006 22:41:33 GMT from <ph**************@ipal.net>:
|>|>> I have a table with 3 columns in 1 row. I want to increase the spacing
|>|>> _between_ the columns (gutter) _without_ increasing the spacing between
|>|>> those columns and the table itself. Is there a way to do that in CSS
|>|>> without having to code in extra dummy columns in HTML to create gutters?
|>|>
|>|>I'm sure there is, but I don't understand your question.
|>|>
|>|>The columns are _part_of_ the table, no? Then what do you mean by
|>|>"spacing between those columns and the table" -- how can there be
|>|>space between a thing and part of itself?
|>|
|>| I would guess he means to increase the spacing between the borders of
|>| cells of adjacent columns, but between the borders of the cells in the
|>| outermost columns and the borders of the table.
|>|
|>| Going across the row:
|>| table border - border-spacing - cell - border-spacing - cell -
|>| border-spacing - cell - border-spacing - table border
|>|
|>| So the objective is to have different values for the outer two lots of
|>| border-spacing than for the inner two.
|>|
|>| As the border-spacing property is set for the whole table this isn't
|>| easily done with CSS.
|>
|>I had been trying to do it with the marging setting and that was not having
|>any effect.
|
| Table cells don't have margins.
No, but it would have been a way to do it if they had.
|> However, I tried it with the padding setting and it seems to
|>be working now.
|
| Ah. I assumed that you had visible borders on your table cells and
| wanted the space between the borders (i.e. the CSS border-spacing
| property) to be variable. IF you have no borders then padding will
| allow you to do everything you want.
|
|>td { padding-left: 24px; }
|>td:first-child { padding-left: 0px; }
|
| You'll need to add a class to the first cell to cope with IE's
| non-support of the :first-child pseudoclass.
I'm not going to worry about IE. I'll include a "Get Firefox" Icon/link.
|>But I still need to find a way to sequeeze the extra space off the edges
|>of the table. HTML seems to force 2 pixels there unless I do cellspacing=0
|>in the HTML on the table element.
|
| That would be the browser's default cellpadding/border-spacing (the
| two are largely analogous). Setting it to zero in CSS in IE is done by
| setting border-collapse: collapse (yes even if you have no borders).
| Setting it to non zero values in CSS in IE is trickier.
And Firefox? Or are you just doing IE?
--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN |
http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net |
http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------