When I put the menu items definition within a DIV <div style="position:absolute; top:100px">, the dropdown menus are appearing with an extra offset down.
How to fix that ? Thanks
When I put the menu items definition within a DIV <div style="position:absolute; top:100px">, the dropdown menus are appearing with an extra offset down.
How to fix that ? Thanks
Try relative position for the container, or better yet just use the default positioning as intended for use with this menu.
If you have to use an absolutely positioned container. Here is where in the script (chrome.js) the top position is set:
If the 'extra offset down' is the same for all items, just subtract it in the above line (like if it is the 100 you used to position the container):Code:this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
But, be aware, different browsers may look at this differently and various adjustments may need to be made for each one, that would be a bit more complex.Code:this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1-100+"px"
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Thanks Mad Prof.
Well, strangely, the negative offset corresponding to the absolute top position of the div container does not force the dropdown menu to stick exactly below the main bar, in IE/Netscape. In the end, probably it is better to use relative position after the top other stuff. But I have to change many things because everything is ouput by PHP.
Anyway thank you for this prompt anwser, the question is closed.
Bookmarks