PDA

View Full Version : anylink css vertical menu position problem



zelda_pinwheel
08-17-2006, 06:33 PM
1) Script Title:
AnyLink CSS Vertical Menu

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/anylinkcss2.htm

3) Describe problem:
i just found your site, and would like to thank you for these excellent scripts, i was able to create and style my dropdown menu using css with no problem (woot!), and i don't know anything about javascript...

my problem is this : if i view the page in a window the same size as the page, the submenu appears correctly positioned next to the main menu element. however, if i enlarge the window to full-screen, it appears in the center of the page, far from the main menu : unesthetic, and if you take to long to get to it, it disappears. if i reduce the window size, it appears on top of the main menu. this happens in firefox and ie.

perhaps this is a problem because the sub menu div uses absolute position, but my page is centered horizontally ? this is somewhat problematic already (but prettier) and i may have to abondon this anyway, so if it will resolve the problem... (this is why i hate full-page background images... but i didn't design this site). i tried to change the submenu div to position : relative, but this created a gap in my main menu the height of the submenu div.

any help would be greatly appreciated ; i am currently working on only this sample page to get all the bugs out so i can still make changes. is there a different sub-menu script that might work better ? don't hesitate to suggest...

you can see my sample page here :

http://cielunatic.free.fr/_newsite/page1jscript.htm

the submenu appears on the menu item "les Spectacles"

thanks in advance for any help.

jscheuer1
08-18-2006, 07:37 AM
You need to put this (red) outside of absolutely and relatively positioned containers like that, ex:


<body>
<div id="anylinkmenu1" class="anylinkcss">
<a href="#" class="nav">Ariane(s)</a>
<a href="#" class="nav">J'ai pas sommeil</a>
<a href="#" class="nav">Petites histoires en l'air...</a></div>
<div id="wrapper">

<!--main content-->
<div id="coldroite" scrolling="yes">

<!--subnav-->
<div id="subnav" class="nav"><ul id="subnav">
<li><a class="nav" href="#">ga . . .

zelda_pinwheel
08-18-2006, 09:48 AM
hello John !

thanks very much for your help, the problem is resolved and the menu now works perfectly, whatever the size of the browser window. happy !
thanks again and thanks to dd for their excellent scripts !

Audrey

zelda_pinwheel
09-01-2006, 07:05 PM
hello again...

so i was really pleased with the whole menu setup until i noticed that when i scrolled down a page with a long central content zone, the anylink menu scrolled up with the page, so that if i tried to navigate to the next page without going back up to the top of the page, the menu was too far up to click on (or completely invisible).

i tried fixing this by adding a position : fixed to the menu div (since my main menu div is also position : fixed, thus the origin of the problem), and thought i was so clever... until just now i discovered that in ie (grrr), now my fixed position submenu appears in a gap *above* the main page, presumably since this is where it appears in the code. in firefox this is not a problem, since it understands the whole position: fixed idea.

is there any way to make this work in ie ? (man i hate non-compliant browsers !)

thanks in advance for your (futher) help, i appreciate it more than you can imagine !

here is a page where you can see the problem :

http://cielunatic.free.fr/_newsite/spectacles/ariane.htm