tim_kinder
04-07-2006, 05:53 AM
Hello,
I want to position a fixed-sized area (let say, 800x600) in the middle of the screen. So I had a table with width and height set to 100% and single cell with align=center and valign=middle.
Inside this cell I placed another table with fixed sizes, and all my other stuff inside. This works well.
Then I had to stick some art-work to left-side of my internal table. In order to do so, I set outer table as 3x3, with top and bottom rows height="50%" and colspan="3", left and right columns width="50%" and middle cell with my actual data. It works in IE and Opera - but in Firefox and Safari put my middle cell to bottom cenetr of the screen.
Are there better solutions for such a layout?
Sincerely,
P.S. this is my code :
<html>
<table border="0" width="100%" height="100%" spacing="0" padding="0" bgcolor="#343434">
<tr height="50%"><td colspan="3"><img src="bmp/spacer.gif" height="1" width="1" border="0"></td></tr>
<tr height="1">
<td width="50%" background="content/gp/background.gif" style="background-position:top right;background-repeat: no-repeat;"><img src="bmp/spacer.gif" width="1" border="0"></td>
<td width="800">
<table border="0" width="800" height="600" spacing="0" padding="0" bgcolor="#0000ff">
<tr><td>aaa</td></tr>
</table>
</td>
<td width="50%"><img src="bmp/spacer.gif" width="1" border="0"></td>
</tr>
<tr height="50%"><td colspan="3"><img src="bmp/spacer.gif" height="1" width="1" border="0"></td></tr>
</table>
</html>
I want to position a fixed-sized area (let say, 800x600) in the middle of the screen. So I had a table with width and height set to 100% and single cell with align=center and valign=middle.
Inside this cell I placed another table with fixed sizes, and all my other stuff inside. This works well.
Then I had to stick some art-work to left-side of my internal table. In order to do so, I set outer table as 3x3, with top and bottom rows height="50%" and colspan="3", left and right columns width="50%" and middle cell with my actual data. It works in IE and Opera - but in Firefox and Safari put my middle cell to bottom cenetr of the screen.
Are there better solutions for such a layout?
Sincerely,
P.S. this is my code :
<html>
<table border="0" width="100%" height="100%" spacing="0" padding="0" bgcolor="#343434">
<tr height="50%"><td colspan="3"><img src="bmp/spacer.gif" height="1" width="1" border="0"></td></tr>
<tr height="1">
<td width="50%" background="content/gp/background.gif" style="background-position:top right;background-repeat: no-repeat;"><img src="bmp/spacer.gif" width="1" border="0"></td>
<td width="800">
<table border="0" width="800" height="600" spacing="0" padding="0" bgcolor="#0000ff">
<tr><td>aaa</td></tr>
</table>
</td>
<td width="50%"><img src="bmp/spacer.gif" width="1" border="0"></td>
</tr>
<tr height="50%"><td colspan="3"><img src="bmp/spacer.gif" height="1" width="1" border="0"></td></tr>
</table>
</html>