views:

137

answers:

1

Hope this isn't "too" niche, because the CSS involved likely applies in other spots.

I'm working with the new Twenty Ten theme in WordPress 3 beta/nightlies, and I'd really like it if the drop-down sub-menus (Pages/custom menus) would expand to the width of whatever is in them, rather than wrap the items at 130px.

Here's an example page set up that contains nothing but the relevant HTML and the Twenty Ten theme CSS file: http://almostexciting.com/wordpress-twentyten-menu.html

I've tried changing the "width" for the link items to a "min-width", which doesn't work - nor does completely removing it. I can't seem to locate any other styles that are constricting the width of the menu items, so I'm a bit desperate for help.

Been tearing this thing up in Firebug for too long now.

+1  A: 

Remove the defined width for your links.

Add this:

#access ul ul a {white-space: nowrap;}

And this:

#access .menu-header ul, div.menu ul {background-color: #333;}
Bryan Downing
That absolutely did it! And yeah, not sure exactly why they didn't just background-color the ULs there instead of items. I had thought about white-space, and have no idea how I overlooked/didn't use it. Thanks!
anonymous coward
:) Just discovered white-space a few months ago myself. What a lifesaver. It has been pretty reliable in my experience as well.
Bryan Downing