Hello,
Likely this has been asked about and resolved before, but I didn't find it.
When I place the entire menu in a table cell all is fine. When I float & center the table, the submenu values left= and top= naturally don't work correctly with different window widths as they refer to the coordinates of the entire browser window. I've worked around this before by not centering the table, but this time I'd really like to center the table in the browser window.
So...has anyone figured out how to get the submenus aligned exactly where you want them in a floating centered table?
Best,
Robert
rel vs abs positioning of submenus in float-centered table
Hi,
Well, you could put the menu into the table and set it as position="relative" instead of using the absolute positioning with top and left.
In the table it will go where the table goes. A url with a sample of what you're doing so we can see it would help. See this info on positioning the menu relatively:
http://milonic.com/tablemenu/
Ruth
Well, you could put the menu into the table and set it as position="relative" instead of using the absolute positioning with top and left.
In the table it will go where the table goes. A url with a sample of what you're doing so we can see it would help. See this info on positioning the menu relatively:
http://milonic.com/tablemenu/
Ruth
Hi Ruth,
The table is fine relatively as are the submenus unless I need to move one of the submenus to the left a little. In this case there is a horizontal submenu that sticks out over the content box and looks UGLY! Therefore, I want to move it over a bit to the left, but if I invoke the left command then the submenu becomes absolutely fixed and moves accordingly way off to the left in the window. Sorry, there is no URL yet although I could put it on my production server if need be.
Robert
The table is fine relatively as are the submenus unless I need to move one of the submenus to the left a little. In this case there is a horizontal submenu that sticks out over the content box and looks UGLY! Therefore, I want to move it over a bit to the left, but if I invoke the left command then the submenu becomes absolutely fixed and moves accordingly way off to the left in the window. Sorry, there is no URL yet although I could put it on my production server if need be.
Robert
Have you tried an offset in the submenu definition?
Assigning the offset value in the left property should offset the submenu left or right; negative values for left, positive for right.
Cheers,
Kevin
Code: Select all
left="offset=-5"
Cheers,
Kevin
Hi Robert,yes, that is the point of my entire post. When you do this the submenu becomes absolute, such that if you use left="10", the submenu is 10 pixels from the left window margin.
I think you may have misunderstood my suggestion. It's the "offset" part that makes the difference.
NOT left=10; That would, as you say, specify an absolute position. Instead, you can also use the left property to assign an offset from the position that the menu would normally take. For example,
left="offset=-10";
would bump the menu over 10 pixels to the left of it's "normal" position when it opens. Note the double quotes around the offset assignment. You would put this in the submenu definition.
Cheers,
Kevin