IdahoEv
11-09-2008, 03:55 AM
A client's designer handed me a PSD with this layout aspect, and i can't figure out how to do it in CSS. I was about to resort to an annoying javascript solution but I thought I'd ask you guys first.
I've got a set of horizontal <li> elements, each with a <ul> submenu nested inside . The submenus need to pop up, still with horizontal positioning. Not too bad. However, the problem is that I need to center each submenu <ul> on the button it descends from. So the parent button is maybe 100 px wide, but the submenu could be anywhere from 150 to 500, with variable # of elements each of variable width.
I've diagrammed the problem in an image that I attached below. Please take a look; any suggestions on how to do this would be greatly appreciated.
Gracias,
Evan
(Edit: for great spelling!)
I've got a set of horizontal <li> elements, each with a <ul> submenu nested inside . The submenus need to pop up, still with horizontal positioning. Not too bad. However, the problem is that I need to center each submenu <ul> on the button it descends from. So the parent button is maybe 100 px wide, but the submenu could be anywhere from 150 to 500, with variable # of elements each of variable width.
I've diagrammed the problem in an image that I attached below. Please take a look; any suggestions on how to do this would be greatly appreciated.
Gracias,
Evan
(Edit: for great spelling!)