Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#15529 closed enhancement (duplicate)

Add class name to first menu item in wp_nav_menu()

Reported by: johnbillion Owned by:
Priority: normal Milestone:
Component: Template Version: 3.1
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses:

Description

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?

Attachments (1)

15529.patch (2.2 KB ) - added by johnbillion 16 years ago.

Download all attachments as: .zip

Change History (3)

@johnbillion
16 years ago

#1 @johnbillion
16 years ago

  • Keywords has-patch needs-testing added

Patch. I think this covers it.

#2 @nacin
16 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Duplicate of #14250 and at least one other, I think. We don't wish to do this. There's code in that ticket that can do this on a filter.

Note: See TracTickets for help on using tickets.