[wp-trac] [WordPress Trac] #15529: Add class name to first menu item in wp_nav_menu()

WordPress Trac wp-trac at lists.automattic.com
Sun Nov 21 06:39:24 UTC 2010


#15529: Add class name to first menu item in wp_nav_menu()
-------------------------+--------------------------------------------------
 Reporter:  johnbillion  |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Template     |     Version:  3.1            
 Severity:  normal       |    Keywords:                 
-------------------------+--------------------------------------------------
 If the theme displays the output of `wp_nav_menu()` horizontally and wants
 to put a separator between menu items, then usually something like a left
 border is used.

 To remove this separator from the left hand side of the menu, the first
 item will often have the border or background image removed by using the
 ':first-child' CSS pseudo class. This is all well and good but the
 ':first-child' selector isn't supported in IE6.

 If we added a 'first-child' or 'first-menu-item' class to the first menu
 item then it'd be easier for themers to use this property and maintain
 support for IE6.

 Thoughts?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15529>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list