Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - dropdown forum menu positionining
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

dropdown forum menu positionining

 Post Reply Post Reply
Author
mtm81 View Drop Down
Groupie
Groupie


Joined: 03 December 2002
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote mtm81 Quote  Post ReplyReply Direct Link To This Post Topic: dropdown forum menu positionining
    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
Back to Top
mtm81 View Drop Down
Groupie
Groupie


Joined: 03 December 2002
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote mtm81 Quote  Post ReplyReply Direct Link To This Post 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';
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.