By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,445 Members | 1,160 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,445 IT Pros & Developers. It's quick & easy.

vertical-align in table cell

P: n/a
Hello.

Why doesn't 'test' appear at the bottom of its cell when I use the following
markup?
How should I achieve this instead?

<table border=1>
<tr>
<td>
<p>Lorem<br>ipsum<br>dolor<br>sit<br>amet...</p>
</td>
<td>
<p style="vertical-align: bottom">test</p>
</td>
</tr>
</table>

P.
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Paul E Collins" <fi******************@CL4.org> wrote:
Why doesn't 'test' appear at the bottom of its cell when I use the following
markup?
Because vertical-align doesn't apply to block level elements like p.
How should I achieve this instead?


Apply the vertical-align to the td element instead.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2

P: n/a
"Steve Pugh" <st***@pugh.net> wrote:
vertical-align doesn't apply to block level elements
like p. Apply the vertical-align to the td element
instead.


If I wanted to have some text at the very top of the cell and some at the
very bottom, how would I go about doing that - or would it require two
separate cells?

Thanks.

P.
Jul 20 '05 #3

P: n/a
"Paul E Collins" <fi******************@CL4.org> writes:
"Steve Pugh" <st***@pugh.net> wrote:
vertical-align doesn't apply to block level elements
like p. Apply the vertical-align to the td element
instead.


If I wanted to have some text at the very top of the cell and some at the
very bottom, how would I go about doing that - or would it require two
separate cells?


It sounds like two separate data items, so two separate data cells.

Of course, if they aren't separate, provide a URL with example and
there might be a better solution.

And if it's a layout table, you're probably better off re-doing the
layout with CSS anyway.

--
Chris
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.