Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Is there any situation (outside of hacks) in which I should use them,
such as for example when I want to create a table?

I want to create something of the following form:

image1 | image2 | image3 |...| imageN |...
data1line1| data2line1 | data3line1 |...| dataNline1 |...
data1line2| data2line2 | data3line2 |...| dataNline2 |...

But I would like each image to be aligned with it's corresponding data.
Secondly, the data consists of a number of lines, and it might be
appropriate to have corresponding lines in different datablocks on the
same line (visually).

On the one hand this is essentially a table, on the other hand, is
there an easier way than using tables to achieve the same effect?
Keeping all the objects together, imageX and dataX follow one another,
to prevent errors being added in, instead of first dealing with all the
images, then with all the first lines, etc. The table environment seems
only to allow columns within rows, and not the other way round. I can
use lists for it, but how do I then make sure that the vertical
alignment remains (the latter question probably fallls outside the
scope of this newsgroup)?

Re: Tables

Ernst Elzas wrote:

Quoted text here. Click to load it

I'm not sure what you mean by "them". Your subject line says 'tables',
but I don't think you mean to ask if you should use tables when you
want to create a table?

Quoted text here. Click to load it

If the datalines correspond with the images, it sounds like a table to
Quoted text here. Click to load it

I think table is the easiest and also the correct way of coding this.

Quoted text here. Click to load it

No, you can have both.

<tr><td colspan="2">A</td></tr>
<tr><td rowspan="2">D</td><td>E</td></tr>
<tr><td colspan="2">G</td></tr>

Should result in:

|     A     |
|  B  |  C  |
|     |  E  |
|  D  |-----|
|     |  F  |
|     G     |

Quoted text here. Click to load it

I'd use a table, unless there isn't a relationship between the
different cells in a row or column.

Els            /
Sonhos vem. Sonhos vão. O resto é imperfeito.
                             - Renato Russo -

Re: Tables

Ernst Elzas wrote:

Quoted text here. Click to load it

Do you want to create a table or do you want to present some
information? Which information?

Quoted text here. Click to load it

But what is the logical structure of the data? Is the line structure of
the text relevant or is it just text that may be divided into lines as
needed to fit into some width (typically, the width of the image)?

This _sounds_ like an image gallery with captions (or descriptions). In
that case, a table _could_ be used, but it need not be the most
appropriate structure. After all, N images might not fit well side by
side in a window with, say, a width of 400 pixels, and on the other
hand, a user with a very wide window might prefer to seeing as many
images as possible in a row. A suitable approach might be to use <div>
markup (or maybe even a single-cell table) for one image and its
caption, and use floating (float: left in CSS) to make them appear side
by side as far as possible. For an illustration see

Re: Tables

Thanks, this helped a lot.

As to what I meant with only columns within rows and not the other way
is allowed,
is not.

Re: Tables

Once upon a time *Ernst Elzas* wrote:
Quoted text here. Click to load it

What? What was it that helped a lot?

Please, quote the relevant part of the post you are responding to so
others can follow what you are talking about without going back and read
the whole thread.

And sometimes the previous post is not even present for others at all,
as is the case for me here. Quoting may also give you more responses to
your posts. Check the link on my sig.


Now ignoring all Google Groups posters who don't quote
* From Google: /

Re: Tables

Quoted text here. Click to load it

I think you consider TD elements to be "column" elements. They aren't.
They're table data cell elements.

I think you want to arrange table data cells in columns, like this:

    <tc> <!--table column-->
        <td>top left</td>
        <td>middle left</td>
        <td>bottom left</td>
    <tc> <!--table column-->
        <td>top center</td>
        <td>middle center</td>
        <td>bottom center</td>
    <tc> <!--table column-->
        <td>top right</td>
        <td>middle right</td>
        <td>bottom right</td>

It's an interesting idea, but HTML tables don't work that way. But you
should be able to represent the same table structure using rows.
Darin McGrew,, /
    Web Design Group,, /

     "Cheaters never win; they just finish first." - Johhny Hart

Site Timeline