Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Positioning 3 tables relative to 1?

0 views
Skip to first unread message

Agustin Chernitsky

unread,
Dec 20, 2000, 4:47:37 PM12/20/00
to
Hi,

Imagine I have one table with a width of 600. Then I want to make 3 tables
that are one beside the other below this one. Something like this:

----------------------------------------------------------
- Table
-
----------------------------------------------------------
----------------- ------------------------ --------------
- table 2 - - table 3 - - table 4 -
----------------- ------------------------- ---------------

According to my knowledge, I will have table 2 relative to table 1, table 3
to table 2 and table 4 to table 3. The problem comes when table 2 is resized
(table 2 has a dynamic generation from a database). This will make table 3
and 4 be disaligned.

The best solution would be to make table 2, 3 and 4 realtive to table 1. Can
someone tell me how? Or best, if you know another workaround, it will be
nice to know it.

Thanks!


Mehmet Ceyran

unread,
Dec 21, 2000, 7:03:02 AM12/21/00
to
Hi!

Is this what you mean?

<TABLE WIDTH="600">
<TR>
<TD COLSPAN="3">Here is Table 1</TD>
</TR>
<TR>
<TD>Table 2</TD>
<TD>Table 3</TD>
<TD>Table 4</TD>
</TR>
</TABLE>

- Mehmet Ceyran


"Agustin Chernitsky" <agustinc...@altavista.com> schrieb im
Newsbeitrag news:O8buL6saAHA.2100@tkmsftngp02...

Rowland Shaw

unread,
Dec 21, 2000, 7:03:42 AM12/21/00
to
or cheat and do sommat like:
<style>
#table2, #table3, #table4 {
display: inline;
}
</style>
<table id="table1"></table>
<table id="table2"></table>
<table id="table3"></table>
<table id="table4"></table>


AFAIK, someone tried this suggestion in the past, and it worked...


"Agustin Chernitsky" <agustinc...@altavista.com> wrote...

Agustin Chernitsky

unread,
Dec 21, 2000, 8:37:54 AM12/21/00
to
Hi Rowland,

using your method, if you add a row in the middle table (3), you will
see that tables 2 and 4 move down. I would like all the tables to be aligned
top.

In this way, if any of the tables grow, they will grow down and the rest of
them will stay were they are (top aligned with table1).

Do you think there is a way to do this?


"Rowland Shaw" <spamf...@anotherpointless.org> wrote in message
news:OKLNlY0aAHA.896@tkmsftngp02...


> or cheat and do sommat like:
> <style>
> #table2, #table3, #table4 {
> display: inline;
> }
> </style>
> <table id="table1"></table>
> <table id="table2"></table>
> <table id="table3"></table>
> <table id="table4"></table>
>
>
> AFAIK, someone tried this suggestion in the past, and it worked...
>
>
> "Agustin Chernitsky" <agustinc...@altavista.com> wrote...
> > Imagine I have one table with a width of 600. Then I want to make 3
tables
> > that are one beside the other below this one. Something like this:
> >
> > ----------------------------------------------------------
> > - Table
> > -
> > ----------------------------------------------------------
> > ----------------- ------------------------ --------------
> > - table 2 - - table 3 - - table

Agustin Chernitsky

unread,
Dec 21, 2000, 8:42:20 AM12/21/00
to
Hi Mehmet,

No, I was looking at something like this:

<table border="1">
<tr>
<td></td>
</tr>
</table>
<table width="100" border="1">
<tr>
<td></td>
</tr>
</table>
<table width="100" border="1">
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table>
<table width="100" border="1">
<tr>
<td></td>
</tr>
</table>

Now, I would like to show the last 3 tables below the first one in a line.


"Mehmet Ceyran" <m...@surfexpress.de> wrote in message
news:91sreh$sn8$07$1...@news.t-online.com...

Rowland Shaw

unread,
Dec 21, 2000, 8:47:41 AM12/21/00
to
So why not:
<table>
<tr>
<td>

<table border="1">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>

<table width="100" border="1">
<tr>
<td></td>
</tr>
</table>
<table width="100" border="1">
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table>
<table width="100" border="1">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</table>


"Agustin Chernitsky" <agustinc...@altavista.com> wrote...


> No, I was looking at something like this:
>

<snip>

Brett Merkey

unread,
Dec 21, 2000, 9:02:04 AM12/21/00
to
> using your method, if you add a row in the middle table (3), you will
> see that tables 2 and 4 move down. I would like all the tables to be
aligned
> top.
>
> In this way, if any of the tables grow, they will grow down and the rest
of
> them will stay were they are (top aligned with table1).
>
> Do you think there is a way to do this?

Yes.

Modify the style so:


<style>
#table2, #table3, #table4 {
display: inline;

vertical-align: top;
}
</style>

Tests well in IE5.5 Windows. I have not tested in IE5.
Perhaps you will want to download and study the CSS2 properties reference
from the W3C site?

Brett
http://home.earthlink.net/~bmerkey/

Agustin Chernitsky

unread,
Dec 21, 2000, 9:07:56 AM12/21/00
to
Yes, it愀 valid. I was just trying to see if that can be avoided with CSS.

I was checking this right now and the problem is the following: It seems
that the tables take the body as the parent element. That愀 why they dont
get aligned. If we have a table and then under it we place another table,
the 1st table should be the parent element. This doesn愒 happen.

Check it yourself with the code you gave me. If you place top: 0px, it
should place all the 3 tables one on top the other. This doesn愒 happen.

"Rowland Shaw" <spamf...@anotherpointless.org> wrote in message

news:OLLh$U1aAHA.1340@tkmsftngp03...

Agustin Chernitsky

unread,
Dec 21, 2000, 9:11:55 AM12/21/00
to
That Vertical-align : top worked fine... still what does the inline do?
Please read my last reply to Rowland. There is something that I found that
isn´t working well..

Thanks a lot!


"Brett Merkey" <brett_...@tvratings.com> wrote in message
news:#t2Fia1aAHA.1960@tkmsftngp04...

Rowland Shaw

unread,
Dec 21, 2000, 9:41:37 AM12/21/00
to
The inline means that it will render the tables in the flow of text, as
apposed to the default, block...

Full details, in http://www.w3.org/TR/REC-CSS1 and
http://www.w3.org/TR/REC-CSS2


"Agustin Chernitsky" <agustinc...@altavista.com> wrote...


> That Vertical-align : top worked fine... still what does the inline do?
> Please read my last reply to Rowland. There is something that I found that
> isn´t working well..
>
>

> "Brett Merkey" <brett_...@tvratings.com> wrote...

Rowland Shaw

unread,
Dec 21, 2000, 9:46:53 AM12/21/00
to
Woo... trying to do it properly :o)

Maybe I'm mis-=interpreting what you're saying here, but a parent is defined
of an element, is the element that contains it; so:
<body>
<table></table>
<table></table>
</body>
In the above examples, both tables are children of <body> however:
<body>
<table> <table></table> </table>
</body>
In that example one table is the child of another which in turn is a child
of the <body> (well, actually, there'd by <td>s and <tr>s in the way, but
hopefully you get what I mean...

I'd imagine they don't positon as you expect because the default styesheet
has "position: relative;" so they'd just stack, one after the other? I may
be worng here...


"Agustin Chernitsky" <agustinc...@altavista.com> wrote...
> Yes, it´s valid. I was just trying to see if that can be avoided with CSS.


>
> I was checking this right now and the problem is the following: It seems

> that the tables take the body as the parent element. That´s why they dont


> get aligned. If we have a table and then under it we place another table,

> the 1st table should be the parent element. This doesn´t happen.


>
> Check it yourself with the code you gave me. If you place top: 0px, it

> should place all the 3 tables one on top the other. This doesn´t happen.
>
> "Rowland Shaw" <spamf...@anotherpointless.org> wrote...
> > So why not:
[ snip nested tables]

Agustin Chernitsky

unread,
Dec 21, 2000, 2:42:58 PM12/21/00
to
Hi Rowland,

What would happen in the case:


<body>
<table> </table> <table></table>
</body>

They惻l both be child of body?


"Rowland Shaw" <spamf...@anotherpointless.org> wrote in message

news:OAnyK21aAHA.1960@tkmsftngp05...


> Woo... trying to do it properly :o)
>
> Maybe I'm mis-=interpreting what you're saying here, but a parent is
defined
> of an element, is the element that contains it; so:
> <body>
> <table></table>
> <table></table>
> </body>
> In the above examples, both tables are children of <body> however:
> <body>
> <table> <table></table> </table>
> </body>
> In that example one table is the child of another which in turn is a child
> of the <body> (well, actually, there'd by <td>s and <tr>s in the way, but
> hopefully you get what I mean...
>
> I'd imagine they don't positon as you expect because the default styesheet
> has "position: relative;" so they'd just stack, one after the other? I may
> be worng here...
>
>
> "Agustin Chernitsky" <agustinc...@altavista.com> wrote...

> > Yes, it愀 valid. I was just trying to see if that can be avoided with


CSS.
> >
> > I was checking this right now and the problem is the following: It seems

> > that the tables take the body as the parent element. That愀 why they


dont
> > get aligned. If we have a table and then under it we place another
table,

> > the 1st table should be the parent element. This doesn愒 happen.


> >
> > Check it yourself with the code you gave me. If you place top: 0px, it

> > should place all the 3 tables one on top the other. This doesn愒 happen.

Rowland Shaw

unread,
Dec 22, 2000, 6:09:08 AM12/22/00
to
Yep, as whitespace makes no difference, that is equivelent to the first
example I gave...


"Agustin Chernitsky" <agustinc...@altavista.com> wrote...

0 new messages