1) Script Title: AnyLink CSS Menu v2.2
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...anylinkcss.htm
3) Describe problem:
Hi guys,
I'm using AnyLink CSS Menu to create a menu which displays HTML-rich DIV's. I.e. when someone hovers over one of the links, they will see a 500x300 pixels box with links, images etc.
Since AnyLink CSS Menu js file usesvisibility: hiddento hide content andvisibility: visibleto display content, this causes major issues with whitespace. CSS propertyvisibilityallocates space on the page for the hidden part. Since my DIV's are rather big (8 hidden divs with height of 300 pixels), this means my page has (8*300) 2400 pixels of whitespace at the bottom of the page.
While surfing this forum for whitespace issues regarding this script, I found a tip from another user who suggested changing thevisibilityvalues in JS file todisplay:nonefor hidden divs anddisplay:inlinein case my menu link gets hovered on. This works like a charm, no whitespace whatsoever - since CSS propertydisplaydoes not allocate space on the page.
However, there's a minor issue I'm trying to fix.
After changing these properties from visibility to display, the script stops calculating users' resolution when deciding where to align the hidden content. As a result,posxcannot be calculated, so every DIV appears aligned left to its parent (menu link). Meaning that a DIV which belongs to a menu link that is far right on the page "escapes off screen" to the right (and is only partially visible).
Does anyone (with any knowlegde of javascript, since I am a noob) know what needs to be done to have the script calculate user's resolution? I know the following code in JS file is responsible for calculating this info andposxdecides how to align the DIV.
Your help is so appreciated!Code:if (posx+this.dimensions.dropmenuw+this.effects.shadow.depth[0]>this.dimensions.docscrollx+this.dimensions.docwidth){ //drop left instead? posx=posx-this.dimensions.dropmenuw + (menu.orientation=="lr"? -this.dimensions.anchorw : this.dimensions.anchorw)
Thanks,
BRS



Reply With Quote

Bookmarks