View Full Version : Need help with positioning hvmenus

03-28-2006, 09:06 PM
In some IE browsers the placement of these drop down menus varies. In one particularly small monitor, I can't view the first menu on the left side (Home), and there is no scrolling to allow this. In another medium sized monitor, I can scroll to see all the menus items, but the far left menu overlaps a part of our background gif, which has a border down the left side. Then, on a couple of monitors, it looks great. I would prefer to be able to designate how far in pixels from the left edge that the menu begins. It seems like the menu should adjust with the different monitors, but it isn't.

The only thing I have thought of that might work would be to lessen the width of each top level menu item, but that would cramp up the spacing. This menu looks fine on most monitors, but the monitors I described above have the menus appearing differently - and causing problems.

Is there some maximum number of pixels that the entire menu should add up to? Or, is there some code to make the menus adjust depending on the size of the monitor? For example, is there a way to designate the width percentage of the hvmenus, like is done when setting up a table? If so, please assume that I am a novice and send specific instructions and which files to adjust. (I'm assuming this might be possible in the exmplmenu_var.js or menu_com.js files.)

04-11-2006, 03:34 PM
Two weeks later, and I've answered my own question! I thought I would post the answer anyway, based on the number of people who have read this post.

Mainly, the offset "y" coordinate variable affects the horizontal placement of these hvmenus. (This is located in the exmplmenu_var.js file.)

To position Dynamic Drive hvmenus at the top of your page and a certain number of pixels from the left border (what I was trying to do), you will adjust the following variables in the exmplmenu_var.js file as follows:

var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'

var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle', ,'bottom' or static

var StartTop=0; // Menu offset x coordinate

var StartLeft=200; // Menu offset y coordinate

(NOTE: Play with the "200" until you get it right on different browsers. A smaller number moves the menus left, and a larger number moves the menus right. "0" moves the menu to the left edge. I believe that adjusting the var StartTop= to a larger number would move the menus further down the page.)

The problem I had was that var MenuCentered='center' did not adjust for various browsers, so on one browser, I could not access the far left drop down menu (which just happened to be "home").

If you want to see these hvmenus on our pages, go to: