0

I'm trying to absolute position a p element inside a table. I tried to make <td> have position relative but it doesn't seem to work.

<td style="position:relative;">
<p style="position:absolute; bottom:0px;"
</td>

Does not work! But this does..

<td>
<div style="position:relative";>
<p style="position:absolute; bottom:0px;"> Success </p>
</div>
</td>

I'm confused why td cant be relative and if using a DIV to absolute position elements inside a <td> is the only option?

Edited by Dat0: n/a

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by SKANK!!!!!
0

Dat0,

I think you will find that css position is inhibited from being applied to table cells because it would at least potentially cause confict/ambiguity with regard to the layout of the rest of the table. After all, TDs are by definition block-like elements that are positioned relative to their neighbours.

However, as you have discovered that the contents of table cells can be relatively/absolutely positioned.

I think you have come up with a good solution.

Airshow

Edited by Airshow: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.