I have a simple php page, with the main content placed in a table which is centred. I want to place a menu which starts at the upper right corner. The code is like this:
echo "<table class=\"center\">";
while($row= mysql_fetch_array($query))
{
echo "<tr>";
echo "<td>";
... content...
echo "</td>";
echo "</tr>";
}
echo "</table>";
echo "<table class=\"topRightTable\">";
while($row= mysql_fetch_array($query2))
{
echo "<tr>";
echo "<td>";
... content ...
echo "</td>";
echo "</tr>";
}
echo "</table>";
With this css:
table.center
{
margin-left: auto;
margin-right: auto;
text-align: left;
}
table.topRightTable
{
position:absolute;
top:50;
right:50;
}
body
{
min-width: 600;
}
This works fine, until the window resizes. Then the right menu will float along with the window, be positioned over other elements. How to avoid the menu item moving along with the window?
I have tried to set the min-width of the page to 600, and hoped this would prevent the right menu from moving further, but with no luck.
The qustion is: how to prevent the right-menu-table from colliding with the center-table