This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > April 2006 > Spacing with CSS and tables in HTML





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Spacing with CSS and tables in HTML
phil-news-nospam@ipal.net

2006-04-28, 10:49 pm

This is expanding on my previous question about gutters in tables.

Here are 3 URLs for sample pages I'm testing with. They vary only by the
table element attribute cellspacing, with values 0, 1, and 2:

http://phil.ipal.org/usenet/ciwas/2...-28/boxes0.html
http://phil.ipal.org/usenet/ciwas/2...-28/boxes1.html
http://phil.ipal.org/usenet/ciwas/2...-28/boxes2.html

The stylesheet is at:

http://phil.ipal.org/usenet/ciwas/2006-04-28/boxes.css

As you can see, adjusting the cellspacing attribute does change the space
that exists between cells. Note that the cells in these pages are WHOLE
columns. The vertical boxes are simply separate div elements in the same
cell. So the space between upper and lower boxes is not affected by the
cellspacing attribute (and not expected to be). I can change that with
the margin-top setting for the inner div element as currently set in the
CSS file for these.

What I would like to find is a way to specify the cellspacing in the style
with CSS, instead of having to set it in the HTML.

That's in addition to my previous post of wanting to find a way to specify
the gutter spacing between cells (but not around the edge of the table),
without having to insert dummy cells to effec the spacing.

Here are my Firefox (1.5.0.2 on Linux) renderings of the above 3 HTML pages:

http://phil.ipal.org/usenet/ciwas/2...es0-firefox.png
http://phil.ipal.org/usenet/ciwas/2...es1-firefox.png
http://phil.ipal.org/usenet/ciwas/2...es2-firefox.png

I'm using the following to learn CSS:

http://www.w3.org/TR/1998/REC-CSS2-19980512/css2.pdf

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews