Menu shifts in IE but isok in FF and Opera

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
R0Bzombie
Advanced
Advanced
Posts: 10
Joined: Fri Aug 25, 2006 7:03 pm

Menu shifts in IE but isok in FF and Opera

Post by R0Bzombie »

as you can see on my test page http://www.r0bzombie.com/test/ the menu is shift in IE but is ok in Opera and FF.
I don't know about MAC browsers.

Thank you
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Well, I think there will be problems as time goes on depending on browser. For whatever reason IE is saying, OK table is 770, but then they say this cell is 578, so we'll use the align=middle and align it based on the 578 width, whereas the other browsers are saying, table is 770, and no matter if it says width=578, that cell has to be 770 since it spans the table and so they put it in the center based on align middle.

My suggestion is you use this

Code: Select all

<TABLE class=mainbody cellSpacing=0 cellPadding=0 width=770 align=center 
border=0>
  <TBODY>
  <TR>
    <TD><IMG src="title.gif" width=770></TD>
  <TR>
    <TD background=table_bg.gif 
    bgColor=#efedde align="center"><center><table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
    <td> <SCRIPT src="mainmenu.js" type=text/javascript></SCRIPT></td>
</tr>
</table></center>
     
    </TD></TR>
  <TR>
    <TD><IMG src="bottom.gif" width=770> </TD></TR></TBODY></TABLE><!-- **** End Title And Menu -->
You'll note that what I did was put a single cell table in that original table cell with no width specified, and used align="center" and center tags [I always use center tags, though I guess they are being phased out]

Anyway, that will make the menu always be in the center, since it is relatively positioned inside that little table and that little table is centered in that table cell. Hope that helps.

Ruth
R0Bzombie
Advanced
Advanced
Posts: 10
Joined: Fri Aug 25, 2006 7:03 pm

Post by R0Bzombie »

Thank you Ruth, it's workinglikea charm.

The only thing left is,in opera it's doing like on the screenshot.

Image

it's still the same website http://www.r0bzombie.com/test/

Thank you very much
Post Reply