By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

Mozilla Drop-down menus head-scratch

P: n/a
I am doing drop-down menus for a site I'm developing (not my idea,
neadless to say.) I have a nice robust Javascript that handles it, and
it actually WORKS, works across browsers even! How unexpected!

However, I have one TINY problem. In netscape, ON OCCASION, the
drop-down menus will show up halfway down the page. Reloading fixes
this. Resizing the windows fixes this. (It's asising, I think,
because of the Mozilla reansparent-picture-image-location hack for
determing position of the original menu on the page.) And it doesnt'
appear consistently.

This is what I THINK is going on- when I double-click to refresh
instead of single, the document re-loads, but some part of the layout
beign generated by the first-click isn't properly cleared. (this bug
onyl shows up when the page reloads funny, but it's often enough I want
it not to happen, because it's MASSIVELY ugly.) Resizing the window
causes it to recalculate the layout positions of those transparent
gifs, and so it fixes itself.

The script I have it really good. (It was someone else's, which I've
mads some additiosn to.) I'd prefer NOT to gut and rebuild if I can.
Especially not for a netscape-only problem.

Is there a way to... 'poke' the document resize event when the page is
finished loading and cause it to recalculate this? I think (provided
it doesn't cause a page redraw) that would solve my problem, and it's
simple enough I don't mind it as a concession to the browser.

Or, has anyone else encountered this and have an alternate solution?
Am I wrong on the cause? Etc.

Technical: the dropdowns are absolutely-positioned DIV's with a z-index
of 20 whose position is determined by the location of a transparent
image before the to-level navigation option they're attached to.

-Derik

Jun 22 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I wrote:
<snip>

Slight update! I removes a tiny bit of odd CSS layout that was working
in IE and not Mozilla, and the problem stopped.
(Why the code would cause this problem instead if simply being
non-supported, why the flag to offset by 10 pixels was offsetting by
400, and why Mozilla would flailingly TRY is beyond me.)

It was really WIERD code though. Instead of offsettign the table, I
had flagged every CELL in the table to be relatively offset down 10
pixels.
....I'm just surprised even IE would do somethign that stupid. I MEANT
to do it to the table...

-Derik

Jun 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.