CSS Layout, IE and Firefox Problems

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
lloyd_borrett
Advanced
Advanced
Posts: 12
Joined: Thu Jul 01, 2004 8:15 am
Location: Cranbourne North, Victoria, Australia
Contact:

CSS Layout, IE and Firefox Problems

Post by lloyd_borrett »

G'day,

I'm having problems getting Milonic DHTML Menu Version 5.733 to position correctly on a web page where most of the layout is CSS based. I can get it to work with MS IE v6, but not Mozilla Firefox v1.0.7.

Now I know I could just force the menu into an absolute position on the page, but then if the CSS file changes I'll have to redo it. And I know I could put the menu in a table and get it to work that way, but I'd prefer to stick with using CSS for the layout if possible. So just how do I get it to work on CSS based pages?

You can see an example page at http://www.winenergy.com.au/colophon.html

The problem I'm having is positioning the menu. I have it working fine in IE v6. I can choose to left, center or right align the menu just by changing the text-align setting in the appropriate style sheet.

Code: Select all

#navitabs{
clear:both;
margin-bottom:0px;
margin-top:5px;
text-align:right
}
But in Firefox the menu stays left aligned no matter what I try.

Also, Firefox doesn't display the menu shadow, doesn't space away from the items above and below (padding, margin), and seems to ignore the submenu offset values.

What I'm doing wrong is probably obvious, but I just can't see it.

Best Regards, Lloyd.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Because IE doesn't some strange things, it seems in this instance it is for whatever reason reading the text-align:right; as aligning the menu right, but that is not correct. In most browsers that will only align text right. The only solution I could find was to put a table in the div and align the table to the right.

Code: Select all

<DIV id=navitabs><table cellpadding=0 cellspacing=0 border=0 align="right">
<tr>
    <td><SCRIPT language=JavaScript type=text/javascript>
with(milonic=new menuname("Main Menu")){
style=horizStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative";
padding=5;
aI("text=Home;url=home.html;status=Home");
aI("text=Why WINenergy;url=why-winenergy.html;showmenu=Why WINenergy");
aI("text=Contact Us;url=contact-us.html;showmenu=Contact Us");
}
drawMenus();
</SCRIPT></td>
</tr>
</table>
</DIV>
Ruth
Post Reply