I’m having difficulty centering my mega menu dropdown here:
http://drupal.scienceworld.ca
The dropdown that unfolds on hover: should I position using CSS, or is there some behaviour of JS that I should be tweaking instead? If CSS is the issue, how should I best keep that dropdown centred in the browser as browser size changes?
After take a closed look to your site, I see your plugin is setting some styles for the hidden div (the visit submenu):
For example in my 1366×780 browser size I got:
This is what is going on:
The plugin calculate the absolute position for the hidden element (I think you are using qTip plugin), and this calculation is based on the menu hovered item (visit on this case).
Possible Solution:
Instead of using that qTip, you can write a simple jquery plugin code for horizontally center the div based on the parent div width:
Use it like this:
$(element).center();
Note: You should use this on hover event in the menu item.