Forum Moderators: open

Message Too Old, No Replies

Vertical centering problems in IE - works in Firefox

         

Chaotic

4:54 pm on Jul 12, 2006 (gmt 0)

10+ Year Member



I'm setting up a really simple personal page at <edited>, but I've run into a really annoying display error - if you're using Internet Explorer - basically, I want to center that box in the middle of the screen, and the code I've written works in Firefox - but for some reason, it doesn't work in Internet Explorer...

Have a look at the body of my index.php file:

<body background="images/back1.gif">

<center>
<table width="100%" height="100%" valign="middle" align="center">
<tr valign="middle"><td valign="middle">
<center>
<table width="60%" height="70%" valign="middle" align="center" cellpadding="2" cellspacing="0">
<tr valign="middle"><td width="175" valign="middle">
<table bgcolor="#000000" width="100%" height="100%" valign="middle" cellspacing="1">
<tr valign="middle"><td valign="middle">
<table bgcolor="#FFFFFF" width="100%" height="100%" valign="middle" cellspacing="1">
<tr><td>
<img src="images/top.png" border="0" alt="Devlog" /><br />
<a href="http://www.example.com/blog/"><img src="images/icon1.png" srcover="images/icon1on.png" border="0" alt="Devlog" /></a><br />
<a href="games.html"><img src="images/icon2.png" srcover="images/icon2on.png" border="0" alt="Games" /></a><br />
<img src="images/bottom.png" border="0" alt="Devlog" /><br />
</td></tr></table>
</td></tr></table>
</td>
<td width=10></td>
<td align="left" valign="top">
<table bgcolor="#000000" width="100%" height="100%" cellspacing="1">
<tr><td>
<table bgcolor="#FFFFFF" width="100%" height="100%" cellspacing="1">
<tr><td>
<center>
<table width="90%" height="100%">
<tr><td>
<big><big><big><em><strong>Site Name</strong></em></big></big></big><br />

<span style="font-size: 9px; line-height: normal">Last updated Monday 10th July 2006</span>
<br />

<br />
I'm still messing about with the design, but I think the site should be up and running in about a week!
<br />

<br />
You can get to the blog by clicking &quot;<span style="font-weight: bold">devlog</span>&quot; on the left. Other links are on their way... <br /><br />

</td></tr></table>
</center>
</td></tr></table>
</td></tr></table>
</td></tr></table>
</center>
</td></tr></table>
</center>

</body>

<Sorry, no specifics.
See Forum Charter [webmasterworld.com]>

[edited by: tedster at 6:04 pm (utc) on July 12, 2006]

waziwazo

6:34 am on Jul 14, 2006 (gmt 0)

10+ Year Member



I dont know why doesn't work in Internet Explorer with %value, look like some sort of bug.

you may try to change %values for pixels value in this line :

<table width="60%" height="70%" valign="middle" align="center" cellpadding="2" cellspacing="0">

Replace with :
<table width="550" height="450" valign="middle" align="center" cellpadding="2" cellspacing="0">

Not sure it would show up as you would like since it would not resize if you change screen resolution. Maybe someone else could come with a better solution?