View Full Version : positioning


toolman
02-15-2004, 09:12 PM
Hi,

Im using the code below and trying to get one table on top of the other and to be centered in center of the page, but i cant seem to get it to work.... the tables just appear below one another.

Heres the code:



<div style="position: relative; z-index:1; top: 20%; " >

<div align="center"><center>

<table border="0" cellpadding="0" cellspacing="0" width="80%"
bgcolor="#5C5C5C">
<tr>
<td>&nbsp;</td>
</tr>
</table>
</center></div>


</div>


<div style="position: relative; z-index:2; top: 22%; " >

<div align="center"><center>

<table border="0" cellpadding="0" cellspacing="0" width="80%"
bgcolor="#282828">
<tr>
<td>&nbsp;</td>
</tr>
</table>
</center></div>


</div>

stargrl329
02-16-2004, 07:00 PM
I tested the code, and the two cells appear in the center of the page and are on top of each other... do you mean that you want them touching?

toolman
02-17-2004, 06:15 PM
Yes, sorry. I mean so that one is covering up half of the other.

stargrl329
02-17-2004, 06:18 PM
Hm. What if you position the second table at 19%?

toolman
02-17-2004, 06:24 PM
Yep, its working now! Thanks :D