Forum Moderators: open

Message Too Old, No Replies

Multiple Column Tables - Splitting

         

Free_Man

4:52 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



I am trying to fight with this issue:

I have a table that has two columns -- I want to split each column up a different locations. The problem is when I split the cell it splits both columns at the same location.

When I ad a row, it only ads the row to the left column...

I can't split the columns up at the same location as they need to be varied...

Any wisdom???

Free_Man

5:05 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



I am trying to avoid nestled tables...

bruhaha

5:55 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



You cannot make the same column vary in length from row to row. But what you can do is create a set of narrower columns, and combine them into various width columns using "colspan".

For instance, you might create a 300px wide two-row table, with three 100px columns in one row and two 150px columns in the other, by combining an underlying set of (at least) six columns, thus:

<table border="2">
<tr>
<td colspan="2" width="100">junk</td>
<td colspan="2" width="100">junk</td>
<td colspan="2" width="100">junk</td
</tr>
<tr>
<td colspan="3" width="150">junk</td>
<td colspan="3" width="150">junk</td
</tr>
</table>

Actually, you could do the same thing with just four columns(widths: 100, 50, 50, 100), combining the middle two in the first row.

So, all you need to do is a bit of arithmetic to figure out how many columns and what width for each,to get the totals you need for each combined-column.

txbakers

6:01 pm on Mar 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



or just use concurrent tables.

There is no law against having more than one table, each with a different layout.

bruhaha

6:32 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



or just use concurrent tables

Technically, yes, and it could be much easier to program (not having to do all the arithmetic). But if the table has the border set to anything more than zero (and I assume from the way the question was asked that there would, in fact, be visible borders), you would end up doubling any borders between tables... probably not something you want.

If, OTOH, you're using tables with no borders or cellspacing (perhaps using different background images or colors for the different "columns"), concurrent tables could work very nicely.

Free_Man

6:47 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



Well I will not have any borders on any of the tables (cells).

Have a look at my profile for the site I am working on...or can I post it?

The problem is that I can split the right column as much as I want it, but when I do the same in the left column it puts a split also in the right column.

I had each of the orange headlined sections as a nestled table before, but am trying to avoid this...

Depending on how much content is below each orange heading, I need to break it up again a different points -- points that are not equal on, or rather are offset from column to column..

Any more ideas?

tedster

9:05 pm on Mar 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From the layout I see, I'm not sure why you want to introduce a new table cell everytime there's a new topic header. Can't this layout all be done with one continuous table cell on each side? It would make life much simpler.

txbakers

9:47 pm on Mar 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Rethinking ones premise is always a good idea.

When you start a layout or design you have to be willing to throw it out at any stage.

Don't get hung up with the first attempt.

Think it through, put it away, and open it up again.

There are lots and lots of approaches to take.