Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Using Tables

Hi,

I have a little problem using tables.
I use them as follows:
[code]

>>>>>>
SomeLargeTextSomeTextSomeText
SomeTextSomeTextSomeText
SomeTextSomeTextSomeText
>>>>>>
SomeTextSomeTextSomeText
SomeTextSomeTextSomeText
SomeTextSomeTextSomeText


[/code]

My problem is that When the texts are of different lengths the cell adjusts to the text. I can put a width= into the td tag to make sure it is of a certain length but My other cells will get smaller and the text will be devided over two lines in those smaller cells.

I also tried placing a width in the table itself in stead of in the cell but it does not do what I want. It devides the extra width over all columns in stead of only to the one column that is lager.

I have two tables that are filled with info I gather from a database (using asp) Those two tables contain the same fields only not the same data. My tables have the same width so that is okay. But when Information in one cell is larger in the first table then in the second the cell gets larger and I want those two tabels to be aligned underneath eachother all cells having the same width...

Is there some way to do this or should I just make it one table. In this last case I can't put anything in between the two tables... or I whould have to place it in a cell with a colspan of the whole table, but I'm sure it could be done simpler.

;-)
-mac-
mailto:programmersheaven@mac-doggie.nl
the Netherlands...

Comments

  • JonathanJonathan Member Posts: 2,914
    Hi,

    So far as I know, there isn't a way of making a table automatically adopt the column widths of another table without defining them with the width parameter. Unless you can do something fancy after the page has rendered using client side scripting and the DOM, but if you can that's surely overkill!

    Know this isn't the answer you're looking for...but then I'm not sure that the answer you're wanting exists... ;-)

    Jonathan

    -------------------------------------------
    Count your downloads:
    http://www.downloadcounter.com/
    And host your site:
    http://www.incrahost.com/
    Don't say I never give you anything... ;-)

  • awulfawulf Member Posts: 40
    [code]

    SomeLargeText SomeText SomeText
    SomeLargeText SomeText SomeText
    here is your middle content.
    SomeLargeText SomeText SomeText
    SomeLargeText SomeText SomeText
    SomeLargeText SomeText SomeText


    [/code]


    the above is code that will align all your columns with space in the middle to put stuff. the stuff in the middle doesn't even have to be the within the width of your original tables.

    with the above code, you'll need to fill in the width's for the cells you have data in. all the columns will have the same width. if you don't want a cell's data to ever wrap, put "nowrap" in the tag.

    hope this helps,
    - Adam
    --------
    awulf :.
    --------
    bus: http://www.inversiondesigns.com
    me : http://awulf.inversiondesigns.com

Sign In or Register to comment.