taaron12 Posted October 13, 2009 Share Posted October 13, 2009 Hi guys. I'm working on my menu set up, still. I've got it where I'm fairly pleased with it(I'll likely be changing the text to an image, as soon as I figure out how.), but I'm not too thrilled on how the drop down works. The last button on the top row, I like how it splits it across in the middle, but the rest of the drop downs, it just pushes everything to the other side. How can I get it to split across the middle like the "Collection" box? My code I'm working with is located at http://scratch.taaron.org/Thanks! Link to comment Share on other sites More sharing options...
jeffman Posted October 13, 2009 Share Posted October 13, 2009 One of your elements in each menu item needs relative or absolute positioning. Can't remember which, and I can't remember if it's the container <li> or the <ul> contained by it. But it's one of them.What's happening is this: The item to be displayed on mouse:hover suddenly interrupts the document flow, so it pushes things out of the way. What you're looking for is a solution that keeps the "new" element out of the document flow. Changing the position property will do that. You'll also need a z-index greater than the other elements' so that it layers in front of them, not behind them. Link to comment Share on other sites More sharing options...
dsonesuk Posted October 13, 2009 Share Posted October 13, 2009 with the suckerfish, the li are positioned relative, while the ul are positioned absolute;#nav li ul{...} represent sublevel 1 menu#nav li ul ul {...} " sublevel 2 menuand so on.the submenus are positioned beyond the viewport of the screen usually to the left using left: -9999em; (but some use margin-left: instead) until required with the hover of the parent menu, when it will be set to left: auto;JavaScript is required for hover for IE browsers, to give the same effect, which is a pain, but what do expect from MS.google 'suckerfish', or 'son of suckerfish' menus. Link to comment Share on other sites More sharing options...
jlhaslip Posted October 14, 2009 Share Posted October 14, 2009 see also: http://cssplay.co.ukthey have some great menu systems all using CSS [that even work in IE]. Link to comment Share on other sites More sharing options...
taaron12 Posted October 14, 2009 Author Share Posted October 14, 2009 Thanks, guys. I'll read up on the sites recommended and get things fixed up. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.