Vertical alignment problem (nested table cells)

O

Ole Streicher

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
 
J

Jonathan N. Little

Ole said:
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.
 
O

Ole Streicher

Jonathan N. Little said:
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
 
O

Ole Streicher

Sid said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top