Vertical alignment problem (nested table cells)

Hi group,

how can I use different alignments in the same table row?

I have two multi-row tables and one one-liner that I want to align as follows:

Centered
Centered One-Row OnTop
Centered OnTop
OnTop

The left cell should be centered around the middle cell, while the right one
should be centered on top of the middle cell.

How can I get this? The usual "vertical-align" attributes (or css) did
not help.

Best regards

Ole
Ole Streicher [ Do, 10 April 2008 20:16 ] [ ID #1939926 ]

Re: Vertical alignment problem (nested table cells)

Ole Streicher wrote:
> Hi group,
>
> how can I use different alignments in the same table row?
>
> I have two multi-row tables and one one-liner that I want to align as follows:
>
> Centered
> Centered One-Row OnTop
> Centered OnTop
> OnTop
>
> The left cell should be centered around the middle cell, while the right one
> should be centered on top of the middle cell.
>
> How can I get this? The usual "vertical-align" attributes (or css) did
> not help.

URL, let's see what you tried...maybe you are approaching the problem
the wrong way.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
lws4art [ Do, 10 April 2008 20:23 ] [ ID #1939928 ]

Re: Vertical alignment problem (nested table cells)

On Thu, 10 Apr 2008 20:16:34 +0200, Ole Streicher
<ole-usenet-spam [at] gmx.net> wrote:

: Hi group,
:
: how can I use different alignments in the same table row?
:
: I have two multi-row tables and one one-liner that I want to align as follows:
:
: Centered
: Centered One-Row OnTop
: Centered OnTop
: OnTop
:
: The left cell should be centered around the middle cell, while the right one
: should be centered on top of the middle cell.
:
: How can I get this? The usual "vertical-align" attributes (or css) did
: not help.


This is a job for ROWSPAN and vertical align. URL?

Sid
Sid Ismail [ Do, 10 April 2008 20:37 ] [ ID #1939930 ]

Re: Vertical alignment problem (nested table cells)

"Jonathan N. Little" <lws4art [at] central.net> writes:
> URL, let's see what you tried...maybe you are approaching the problem
> the wrong way.

Unfortunately, I have no public server. Here is what I use:

<!---------------------------------------------------------------->
<html><body>
<table><tr>
<td>
<table>
<tr><td>exp(x)<hr></td></tr>
<tr><td>exp(y)</td></tr>
</table>
</td>
<td>when</td>
<td>
<table>
<tr><td>x exists</td></tr>
<tr><td>and x * y =3</td></tr>
</table>
</td>
</tr></table>
</body></html>
<!---------------------------------------------------------------->

This also shows what I want: a view of some math-like formulas (the
code above is part of a greater switch statement). The problem here is
that (in that example) the rightmost column may be quite long so I
have to break it into multiple rows. In that case, it ist difficult to
read (especially, if there are 3 rows or even more).

I played around with the "valign" attributes as well as with the
according css style option, but without success.

Since the code is part of an automatically generated html page (from a
mathml like xml source), I cannot manually optimize every formula but
need some automatism.

Any ideas?

Regards

Ole
Ole Streicher [ Do, 10 April 2008 20:46 ] [ ID #1939931 ]

Re: Vertical alignment problem (nested table cells)

On Thu, 10 Apr 2008 20:46:14 +0200, Ole Streicher
<ole-usenet-spam [at] gmx.net> wrote:

: "Jonathan N. Little" <lws4art [at] central.net> writes:
: > URL, let's see what you tried...maybe you are approaching the problem
: > the wrong way.
:
: Unfortunately, I have no public server. Here is what I use:
:
: <!---------------------------------------------------------------->
: <html><body>
: <table><tr>
: <td>
: <table>
: <tr><td>exp(x)<hr></td></tr>
: <tr><td>exp(y)</td></tr>
: </table>
: </td>
: <td>when</td>
: <td>
: <table>
: <tr><td>x exists</td></tr>
: <tr><td>and x * y =3</td></tr>
: </table>
: </td>
: </tr></table>
: </body></html>


No need to have nested table.

Try this:
<table cellpadding=10>
<tr>
<td>exp(x)<br><hr>exp(y)</td>
<td>when</td>
<td>x exists and x * y =3</td>
</tr>
</table>

Sid
Sid Ismail [ Fr, 11 April 2008 12:58 ] [ ID #1940975 ]

Re: Vertical alignment problem (nested table cells)

Sid <elsid [at] nospam.com> writes:
> No need to have nested table.

Since every operand in the formula may be another multi-line
operation, I need to put them there.

> Try this:
> <table cellpadding=10>
> <tr>
> <td>exp(x)<br><hr>exp(y)</td>
> <td>when</td>
> <td>x exists and x * y =3</td>
> </tr>
> </table>

This works only if the third expression is short enough (what was only
the case in the example to save space in the posting). Usually, they are
quite long.

Regards,

Ole

--
If you think technology can solve your problems you don't understand
technology and you don't understand your problems. (Bruce Schneier)
Ole Streicher [ Fr, 11 April 2008 14:41 ] [ ID #1940978 ]
Miscellaneous » alt.html » Vertical alignment problem (nested table cells)

Vorheriges Thema: Is it possible to split a UL list into two columns?
Nächstes Thema: Digital Products on website