Print Page | Close Window

dropdown forum menu positionining

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=30475
Printed Date: 31 March 2026 at 10:27am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: dropdown forum menu positionining
Posted By: mtm81
Subject: dropdown forum menu positionining
Date Posted: 06 September 2012 at 1:29pm
I can see that the forum uses some javascript to get the position for the drop down menus that are used throughout the forum (post options or the min search for example).
My forum is integrated within website which is 980 width and is center aligned (i.e the main holding div is 980px wide and has it's left and right margins set to auto, thus pushing the div into the center.
 
I'm not sure if that's the cause, however when I click on a link which would show one of these drop menus - the menu appears far too far over to the right hand side of the screen as a whole.
I can see that the css uses position:absolute and this would be fine, however it appears that the left and top settings for the element in the css file are overwritten during the click and are calculated on the fly.
 
How do I either amend this calc or turn it off all together?
Many Thanks



Replies:
Posted By: mtm81
Date Posted: 06 September 2012 at 2:37pm
ok all sorted.
looking in  the default_javascript_v9.js file I found the showDropDown() function.
looking on the forum I then found the following fix which makes the function take into account the overall container for the site if you page is setup like my site.
This works really well.
 
these lines:
dropDownElement.style.left = (getOffsetLeft(parentElement) - offSetRight) + 'px';
 dropDownElement.style.top = (getOffsetTop(parentElement) + parentElement.offsetHeight + 3) + 'px';
go to this:
 
var mOffsetContainer = document.getElementById('overallcontainer')   
 mOffsetC = mOffsetContainer.offsetLeft;
 dropDownElement.style.left = (getOffsetLeft(parentElement) - offSetRight - mOffsetC) + 'px';   
 dropDownElement.style.top = (getOffsetTop(parentElement) + parentElement.offsetHeight + 5) + 'px';



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net