Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Manpreet Wasan
Manpreet Wasan
2,739 Points

How to set our dropdown menu with own css align rightly using wordpress ?

Please Help to write function for aligining dropdown for submenu in the part of dropdown using wordpress

Gail Hall
Gail Hall
5,598 Points

Thank you, Manpreet, for asking this question recently - this is just what I was trying to find out!!! :)

1 Answer

The simplest way is to use your css and style the ul for the sub menus and add text-align: right.

Gail Hall
Gail Hall
5,598 Points

Thank you so much, Jacob! I knew I had done this before in the Custom CSS Classes option box in the menu editor on WordPress, but could not for the life of me remember how I did it, and have been searching the Internet for a good while! This was exactly what I needed to know!!! :)

Gail, yes the css option for custom classes works, but you should research the walker class, to remove the wp classes. Also you can set your own classes in the wp_menu function as well.