Forum Moderators: not2easy

Message Too Old, No Replies

Color control on Tables, without using extra tables

Just wondering if this is possible

         

mikejson

5:31 pm on Sep 12, 2003 (gmt 0)

10+ Year Member



I'm just wondering if this is possible. I have a table that needs to be organized like this

table size 7x9

AND

(1,1)(1,2)...(1,7)
(2,1)... (2,7) are all having the same bgcolor, and same border color
(3,1)... (3,7)
(4,1)... (4,7) are all having the same bgcolor/border.

is there a way to do this without having tables inside of tables...?

I would assume that if there is a way, it would be in CSS.

ronin

11:44 pm on Sep 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm sure one of the css pros will be able to indicate an elegant css solution... but in the meantime, as an inelegant hack, have you tried just stacking the 9 tables, one underneath the other?

ie.
<table><tr><td>...</td> .... <td>...</td></tr></table><br>
<table><tr><td>...</td> .... <td>...</td></tr></table><br>
<table><tr><td>...</td> .... <td>...</td></tr></table><br>
<table><tr><td>...</td> .... <td>...</td></tr></table><br>

etc.

You shouldn't need to contain these stacked tables inside a table...

rahmuss

12:53 am on Sep 13, 2003 (gmt 0)

10+ Year Member



I'm guessing that every other row will have the same color and border right? And that the spaces in between will have no kind of border and background? If that's true, then you might want to include a simple little javascript command that will do that, and will even let you choose how many rows you want to have.

The javascript would have:
- A loop that would continue as many times as you want
- A table command with the first desired row.
- A table command with the second desired row.

The best loop to use would be the "for" loop. It would be really simple. If you have any problems let me know and I'll e-mail you with help. Or you can try it another way.

mikejson

1:42 pm on Sep 15, 2003 (gmt 0)

10+ Year Member



Well, I did it a slightly different way... not exactly what I was looking for, but it did the job, everything is seperate now. cellspacing/padding, and a couple empty rows with different bgcolor did the trick