wp

Solve the TwentyTen theme dropdown menu from going out of the screen edge

If you have a lot of pages in a hierarchical organization you might have noticed that the drop-down menu of the default WordPress theme, TwentyTen, always unfolds to the right.

The problem is that, if a top parent menu is on the right of your website, it unfold its child items out of the screen edge….

I have a small simple hack to prevent that from happening. First add a css rule:

#access li.left ul ul {
 left: -100%;
}

Then go to WordPress administration and edit the parent menus for witch you want child menus to unfold to the left. There you’ll have, if not already, to enable the CSS attribute for menu items. For this, enable “CSS Classes” in screen options.

Finally simply add the CSS class ‘left’ to any top parent menu to see its child menus unfold to the left.

Done.

Published by

Lox

Developer, Linux Admin and mobile techs enthusiast.

Leave a Reply

Your email address will not be published. Required fields are marked *