2 replies [Last post]
tracyberna
Offline
Regular
Los Angeles, CA
Last seen: 10 years 48 weeks ago
Los Angeles, CA
Joined: 2005-11-03
Posts: 18
Points: 0

I seem to have bungled my way into the dropdown menu from Hell.

It's a Wordpress site. I started out with someone else's theme way too many months ago (the person I'm making this for has taken forever), so I don't really remember specifically how I hacked it. I have now gone over and over and over this freaking code till I don't know what end is up anymore and made a mess of it. Most of this bungling has occurred because 1) I have a layout that's supposed to be centered and liquid and 2) I've been messing with it trying to get things to work in IE.

Here are the issues.

1. I made a fixed width container for the li's that make up the menu. In Firefox, I've arranged for them to line up to the right (with text-align, not float) within said fixed width, centered container. In IE, (I'm testing on IE6, but according to crossbrowsertesting.com it does the same thing in IE7. In IE8 the whole thing squishes over to the left. Oy.) the li's spill out about 200px past the end of the container. I want them to stay within somehow. I've tried a bunch of stuff but nothing's worked.

2. Somewhere along the line I created the problem of the dropdown items disappearing as soon as you try to select them (in Firefox, IE6 and 7. In IE8 it seems you can select things). If you're careful you can sometimes get the first item to stay put long enough to select it, but the items after that you definitely can't get.

3. Extra points for a non-menu related problem that's plagued me the whole time: I have a background repeating on the y axis for the body element that will not center in IE. Does so fine in FF.

I plan to put any IE-specific code in an "if IE" statement in the header. Right now all I've done there is put have borders around the elements so you can pick them out.

Both the CSS and the XHTML validate.

Site: http://metroencoding1.net/
CSS: http://metroencoding1.net/wp-content/themes/freshcitrus/freshcitrus/style.css

I beg someone to give me some perspective. ::is dead::

----
~*~ When in Hollywood, visit www.tracyberna.com ~*~

flamenco
flamenco's picture
Offline
Enthusiast
US, East Coast
Last seen: 9 years 30 weeks ago
US, East Coast
Timezone: GMT-5
Joined: 2009-04-13
Posts: 240
Points: 144

I have a bunch of recent

I have a bunch of recent experience doing Suckerfish dropdowns with Wordpress. As good as that combo is, little adjustments can throw the whole thing off. But maybe it would be an option for you. There's a nice plugin for it. Smile

Oo boy, I'm having trouble following the code. Indeed, I would have probably used floats and other positioning methods than "absolute". I've also never used text-align to get a dropdown to work, although it's possible that it can. And lots of nested UL's may be having who-knows-what effect. But maybe I can offer some thoughts.

See this bit of code? It appears to be making it so that your actual dropdown links are way to the right of the dropdown images. Note the "left" setting. If that's true, your mouse may never be able to actually "touch" the link. Padding and margin settings also may contribute to making a link unclickable. Dropdowns are so finicky.

#sidebar li li ul {
left:30px;
top:10px;
}

It looks like with the "position: absolute" there, these settings are required, or the link is further off in la-la land. But you could try experimenting with the settings. Sorry not to have more encouraging news. Good luck.

tracyberna
Offline
Regular
Los Angeles, CA
Last seen: 10 years 48 weeks ago
Los Angeles, CA
Joined: 2005-11-03
Posts: 18
Points: 0

Thank you so much for

Thank you so much for responding, Flamenco. And nicely, too, not making fun of my nasty code. Smile

I think what I tried to do way back when was an unholy union between the code of the theme I started out with and this dropdown menu code that people were recommending by someone at http://www.jillij.com. I don't think they mixed well. I think I'm going to try starting from scratch: making a child theme of the theme I started with and perhaps using a plugin for the menus. I don't relish the idea but perhaps it'll actually be simpler than I made it before and besides, the initial try wasn't exactly bulletproof. I'd like it to be.

Thanks again. :thumbsup:

----
~*~ When in Hollywood, visit www.tracyberna.com ~*~