PDA

View Full Version : Auto reposition menu


lionheart008
08-15-2007, 11:09 AM
Hello,

When the height of the window is small, the menu is automatically repositioned to stay in the view which is great. However it covers the horizontal bar so that the link that you hover over to bring up the menu is covered. Is there anyway to auto position the menu to the right as well so the original link is still accessible?

Also UDM adds blank space to the bottom of my page (when the height is small). It's the same height as where the menu would have been before being auto-repositioned.

I hope this makes sense.

bcarl314
08-16-2007, 01:43 AM
Hello,

You may look into absolutely styling the position of the sub menus using external css.

If you post a link to your site I may be able to help further.

lionheart008
08-20-2007, 05:53 AM
I only want to reposition the menus to the right on-hover when the menu is pushed up because the height of the page is not sufficient. I do not want it to appear that way all the time. The reason I want to do this is that when the menus push up they cover the original link. I do not have a live demo to show you.

For example, I am using php. When the menu's push up I would like to be able to adjust this section

$um['navbar'] = array(
'0', // nav to menu x-offset (+-)["n" pixels]
'1', // nav to menu y-offset (+-)["n" pixels]
'7.5em', // width ["em"|"ex"|"px"] (vertical navbar only - horizontal navbar items have "auto" width) ("%" doesn"t work right)
);

bcarl314
08-22-2007, 02:22 PM
The default configuration for the menu is to reposition sub menus, to the extent possible, to display inside the current window. What you are looking to do is override that behaviour?

If so, have you tried adding some external css? Something like the following:


ul#udm ul {
position:absolute;
top:3px;
right:3px;
}

lionheart008
08-26-2007, 11:36 AM
I only want to set this for one menu not all. Also if I do set it for the root ul element it filters down to all child nodes.

All I want to do is move the menu to the right relative from it's original position. The script moves it up relatively, I want to move it horizontally as well.

bcarl314
08-27-2007, 02:26 PM
Well, you could add a few CSS declarations to handle this.

First, override the default setting as I mentioned before, but if you want to apply to only one, then give that ul and ID and apply it. For example...


<ul id="special_ul">


Then in your CSS do this...


ul#udm ul#special_ul {
position:absolute; /* or relative, whatever works for your needs */
top:3px;
right:3px;
}

dirka
10-31-2007, 07:08 PM
Is there just a way to make the reposition in viewport effect work only horizontally, not vertically. Anyone know where/how to make this edit?

dirka
10-31-2007, 11:24 PM
Nevermind, figured it out. I also realized that this is bad for accessibility reasons. It forces the user to use the mouse scroll wheel to make it down to the bottom of long list, that would normally float vertically. You know, what about us Mac user without scroll wheels???