Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[html][tables] removing gaps from table cells and rows within css...

 [1/5] from: moliad::aei::ca at: 20-May-2004 0:34


Hi, although this is not specifically rebol related, I know many of you are seasoned html coders and I was wondering what I have to include in a css file so that ALL spacing is removed in between elements. right now I have the following css and I still get some spacing... the W3c docs aren't the most helpfull sometimes... BODY { margin: 0; text-align: center; background-image: url("images/bg.jpg"); background-repeat: repeat; font: 10pt "trebuchet ms", serif; } TABLE { border: 1px solid ; border-color: white; margin: 0; padding: 0; border-spacing: 0 ; spacing: 0; } TR { margin: 0; padding: 0; border: 3px solid; border-color: rgb(255, 0, 0); border-spacing: 0; spacing: 0; } CR { margin: 0; padding: 0; border: 3px solid; border-color: rgb(0, 255, 0); border-spacing: 0; spacing: 0; } TD { border: 3px solid; border-color: rgb( 0, 0, 255); border-spacing: 10; margin: 0; padding: 0; spacing: 0; } The strange thing is that if I specify spacing to be 0 in the table element's html tag for spacing, then it works... I just haven't found an equivalent in css yet... and I'd prefer to have all looks handling within the css... also, I was wondering, if it possible to make tables non autolayout (i.e, each row/column needs to have its size specifically set, which would potentially make it much cleaner across different browsers). -MAx

 [2/5] from: roland:hadinger:arcor at: 20-May-2004 8:18


Hi MAx, On Thursday 20 May 2004 06:34, Maxim Olivier-Adlhoch wrote: ....
> The strange thing is that if I specify spacing to be 0 in the table > element's html tag for spacing, then it works... I just haven't found an > equivalent in css yet... and I'd prefer to have all looks handling within > the css...
Try: table { ... border-collapse:collapse; } .... this suppresses spacing between table cells.
> also, I was wondering, if it possible to make tables non autolayout (i.e, > each row/column needs to have its size specifically set, which would > potentially make it much cleaner across different browsers).
I found that setting column widths in <colgroup> and row heights inside the <tr> tag doesn't always work reliably especially on older browsers, some of your table content may expand the table... If the thing you want to do its more like a page layout and less like a conventional table, and you don't need the flexible, grid bag layout-like behaviour of tables anyway, it's probably better to use <div> and <span> elements combined with CSS styles instead. BTW: this site seems to have decent online references and tutorials for HTML/CSS... http://www.w3schools.com/default.asp -- R.

 [3/5] from: roland:hadinger:arcor at: 20-May-2004 8:25


Oh, and this looks like a typo:
> CR { > margin: 0; > padding: 0;
.... Did you mean TH instead of CR? -- R.

 [4/5] from: moliad:aei:ca at: 21-May-2004 23:36


thanks Roland...
> table { > ... > border-collapse:collapse; > }
this is a little extreme, it collapses the edges themselves...and it ends up looking all screwed up !?
> BTW: this site seems to have decent online references and tutorials for > HTML/CSS... > > http://www.w3schools.com/default.asp
THIS IS A GOD SEND... thanks -MAx

 [5/5] from: moliad:aei:ca at: 21-May-2004 23:48


I checked it out and neither iexplorer or netscape seem to support the border-spacing css tags. so, I'm using the trusty, old, html 4.01 cellspacing table attribute... which, of course, works... its funny how everyone seems to say... don't use html tags anymore, css is much better... yet browsers don't fully support css, which means you still have to use html tags... thanks anyhow. -MAx ----- Original Message ----- From: "Maxim Olivier-Adlhoch" <[moliad--aei--ca]> To: <[rebol-list--rebol--com]> Sent: Friday, May 21, 2004 11:36 PM Subject: [REBOL] Re: [html][tables] removing gaps from table cells and rows within css...