weird sub offset in FireFox, Safari & Chome - IE ok [SOLVED]

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
nwilcox
Mega Advanced
Mega Advanced
Posts: 269
Joined: Sat Aug 20, 2005 6:14 am
Location: Indianapolis, IN
Contact:

weird sub offset in FireFox, Safari & Chome - IE ok [SOLVED]

Post by nwilcox »

Hello,

http://dev.eatright.org/public/content.aspx?id=806

Menu pops wayyyyy off to the right in Firefox, less far off in Safari and looks fine in IE.

Any ideas?
Attachments
suboffset.gif
suboffset.gif (36.27 KiB) Viewed 4988 times
Last edited by nwilcox on Fri Jul 24, 2009 7:57 pm, edited 2 times in total.
Nick Wilcox
Web Developer
ServerSide, Inc.
http://www.serverside.net
User avatar
nwilcox
Mega Advanced
Mega Advanced
Posts: 269
Joined: Sat Aug 20, 2005 6:14 am
Location: Indianapolis, IN
Contact:

Re: weird submenu offset in FireFox, Safari and Chome - ok in IE

Post by nwilcox »

okay I've search on the forum and found this:
viewtopic.php?f=10&t=10156&p=48383&hili ... oad#p48383

To verify I already had position=relative set so that wasn't the issue.

After putting in "buildAfterLoad=true;" it worked (I have taken it back out to show the error)

What is that parameter telling Milonic to do and and why is it ncesssary now? I've never had to use this before with the menus.

Also is there a performance hit or display delay on using this parameter?
Nick Wilcox
Web Developer
ServerSide, Inc.
http://www.serverside.net
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: weird submenu offset in FireFox, Safari and Chome - ok in IE

Post by Ruth »

Hi,

Well, I found the issue. It is in the css, the

Code: Select all

#contentContainer {
	BACKGROUND-POSITION: 240px 0px; BACKGROUND-IMAGE: url(main-repeat.gif); WIDTH: 960px; BACKGROUND-REPEAT: repeat-y; POSITION: relative
}
It is actually the POSITION:relative; part that is causing the conflict and I do not know how to fix that. IE seems to only apply that css to the container while the others seem to apply it to the container and all containers in it and since the menu is built of divs, tables and spans it's like it's getting applied to them in those other browsers. Since I don't really know what is going on, I just make guesses based on what I see happening. The buildAfterLoad=true; is fixing the problem because it is letting the browser apply the css to the page before the menu is built and once it is applied, then when the menu is built it doesn't get that attached to it. So, probably in most cases you wouldn't have to use that buildAfterLoad, this seems an unusual case. As far as I know there is no display delay or performance problem with this.

Hope that helps.

Ruth
User avatar
nwilcox
Mega Advanced
Mega Advanced
Posts: 269
Joined: Sat Aug 20, 2005 6:14 am
Location: Indianapolis, IN
Contact:

Re: weird submenu offset in FireFox, Safari and Chome - ok in IE

Post by nwilcox »

You save my tail once more.... that did it! :D

Nice find Ruth - no need for the buildAfterLoad=true call now!
Nick Wilcox
Web Developer
ServerSide, Inc.
http://www.serverside.net
wpatters1229
Super Advanced
Super Advanced
Posts: 90
Joined: Thu May 30, 2002 7:35 pm

Re: weird sub offset in FireFox, Safari & Chome - IE ok [SOLVED]

Post by wpatters1229 »

I am having a similar problem. I have two menus one at the top and one on the left. They are positioned using the top and left attributes because they need to be inside of divs. They work fine in IE v8 and the submenus do not have any positioning rules...just the item width.
In Firefox the submenus are all over the place and if I use absolute positioning they work fine in FF but in IE they are all messed up. I have tried the BuildAfterLoad = true in the top menu just as a test and it doesn't seem to do much

See the code in http://www.stephenwellsmd.com/billing.htm

If I use position="relative" then the menu is at the top of the page instead of down where it belongs and other items on the page look out of place. I think the positon=relative is affecting the page CSS file.

What to do???
Post Reply